Skip to content

Commit b8ee8f0

Browse files
committed
attempt to fix webpack
1 parent 2f0695e commit b8ee8f0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

index.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -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)
1+
const runtimeRequire = typeof __webpack_require__ === 'function' ? __non_webpack_require__ : require // eslint-disable-line
2+
if (typeof runtimeRequire.addon === 'function') { // if the platform supports native resolving prefer that
3+
module.exports = runtimeRequire.addon.bind(runtimeRequire)
34
} else { // else use the runtime version here
45
module.exports = require('./node-gyp-build.js')
56
}

0 commit comments

Comments
 (0)