Skip to content

Commit

Permalink
attempt to fix webpack
Browse files Browse the repository at this point in the history
  • Loading branch information
mafintosh committed Nov 23, 2023
1 parent 2f0695e commit b8ee8f0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
if (typeof require.addon === 'function') { // if the platform supports native resolving prefer that
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
module.exports = runtimeRequire.addon.bind(runtimeRequire)
} else { // else use the runtime version here
module.exports = require('./node-gyp-build.js')
}

0 comments on commit b8ee8f0

Please sign in to comment.