We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2f0695e commit b8ee8f0Copy full SHA for b8ee8f0
index.js
@@ -1,5 +1,6 @@
1
-if (typeof require.addon === 'function') { // if the platform supports native resolving prefer that
2
- module.exports = require.addon.bind(require)
+const runtimeRequire = typeof __webpack_require__ === 'function' ? __non_webpack_require__ : require // eslint-disable-line
+if (typeof runtimeRequire.addon === 'function') { // if the platform supports native resolving prefer that
3
+ module.exports = runtimeRequire.addon.bind(runtimeRequire)
4
} else { // else use the runtime version here
5
module.exports = require('./node-gyp-build.js')
6
}
0 commit comments