Skip to content

Commit 7eb3555

Browse files
committed
Fix the absolute path used in NodeStuffPlugin
1 parent 7c5da65 commit 7eb3555

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎lib/NodeStuffPlugin.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,6 @@ NodeStuffPlugin.prototype.apply = function(compiler) {
8787
return new BasicEvaluatedExpression().setBoolean(false).setRange(expr.range);
8888
});
8989
compiler.parser.plugin("expression module", function() {
90-
return ModuleParserHelpers.addParsedVariable(this, "module", "require(" + JSON.stringify(path.join(__dirname, "..", "buildin", "module.js")) + ")(module)");
90+
return ModuleParserHelpers.addParsedVariable(this, "module", "require(" + JSON.stringify(path.relative(this.state.module.context, path.join(__dirname, "..", "buildin", "module.js"))) + ")(module)");
9191
});
9292
};

0 commit comments

Comments
 (0)