Skip to content

Commit

Permalink
Used the compiler's context to get a relative path to the manifest file.
Browse files Browse the repository at this point in the history
  • Loading branch information
reduckted committed Jul 2, 2018
1 parent 8f748e2 commit 5b6f99b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions lib/DllReferencePlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,10 @@ class DllReferencePlugin {
} catch (e) {
// Store the error in the params so that it can
// be added as a compilation error later on.
const manifestPath = this.options.context
? makePathsRelative(this.options.context, manifest)
: manifest;
const manifestPath = makePathsRelative(
compiler.options.context,
manifest
);
params[
"dll reference parse error " + manifest
] = new DllManifestError(manifestPath, e.message);
Expand Down
4 changes: 2 additions & 2 deletions test/__snapshots__/StatsTestCases.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -731,15 +731,15 @@ Entrypoint main = bundle.js
`;

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

Expand Down

0 comments on commit 5b6f99b

Please sign in to comment.