Skip to content

Commit 5b6f99b

Browse files
committed
Used the compiler's context to get a relative path to the manifest file.
1 parent 8f748e2 commit 5b6f99b

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

lib/DllReferencePlugin.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,10 @@ class DllReferencePlugin {
5454
} catch (e) {
5555
// Store the error in the params so that it can
5656
// be added as a compilation error later on.
57-
const manifestPath = this.options.context
58-
? makePathsRelative(this.options.context, manifest)
59-
: manifest;
57+
const manifestPath = makePathsRelative(
58+
compiler.options.context,
59+
manifest
60+
);
6061
params[
6162
"dll reference parse error " + manifest
6263
] = new DllManifestError(manifestPath, e.message);

test/__snapshots__/StatsTestCases.test.js.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -731,15 +731,15 @@ Entrypoint main = bundle.js
731731
`;
732732

733733
exports[`StatsTestCases should print correct stats for dll-reference-plugin-issue-7624-error 1`] = `
734-
"Hash: db465df0da5d95ebf88f
734+
"Hash: 701dcf62b26d0347b899
735735
Time: Xms
736736
Built at: Thu Jan 01 1970 00:00:00 GMT
737737
Asset Size Chunks Chunk Names
738738
bundle.js 3.6 KiB 0 main
739739
Entrypoint main = bundle.js
740740
[0] ./entry.js 29 bytes {0} [built]
741741
742-
ERROR in Dll manifest Xdir/dll-reference-plugin-issue-7624-error/blank-manifest.json
742+
ERROR in Dll manifest blank-manifest.json
743743
Unexpected end of JSON input while parsing near ''"
744744
`;
745745

0 commit comments

Comments
 (0)