We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 09848ab commit 047834eCopy full SHA for 047834e
loader.js
@@ -135,8 +135,9 @@ class Loader extends Pool {
135
const contextModule = new Module(filename)
136
137
// istanbul ignore next
138
- const contextRequire = 'function' === typeof Module.createRequireFromPath
139
- ? Module.createRequireFromPath(filename)
+ const createRequireFromPath = Module.createRequire || Module.createRequireFromPath
+ const contextRequire = 'function' === typeof createRequireFromPath
140
+ ? createRequireFromPath(filename)
141
: makeRequireFunction(contextModule)
142
143
Object.assign(contextModule, {
0 commit comments