Skip to content

Commit 62229f5

Browse files
committed
make path ignored before it goes to records, prevent to have to do it in NMF
1 parent c9fa129 commit 62229f5

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

‎lib/NormalModuleFactory.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ function NormalModuleFactory(context, resolvers, options) {
151151
return callback(null,
152152
new RawModule(
153153
"/* (ignored) */",
154-
"ignored " + path.relative(__dirname, context) + " " + request,
154+
"ignored " + context + " " + request,
155155
request + " (ignored)"
156156
)
157157
);

‎lib/RecordIdsPlugin.js‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,13 @@
66

77
function makeRelative(compiler, identifier) {
88
const context = compiler.context;
9-
return identifier.split("|").map(str => str.split("!").map(str => path.relative(context, str)).join("!")).join("|");
9+
return identifier.split("|")
10+
.map(str => str.split("!")
11+
.map(str => str.split(" ")
12+
.map(str => path.relative(context, str))
13+
.join(" "))
14+
.join("!"))
15+
.join("|");
1016
}
1117

1218
const path = require("path");

0 commit comments

Comments
 (0)