Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: webpack_runner.js

Issue 29762564: Issue 6625 - Expose webpack's resolve.alias to the packagers (Closed)
Patch Set: Created April 26, 2018, 11:40 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« tests/metadata.edge ('K') | « tests/test_packagerWebExt.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webpack_runner.js
diff --git a/webpack_runner.js b/webpack_runner.js
index 57c7bd5531c48c186c78b3b1bff538b173359ee8..d46bc5980eabc3f96c31cf6f8665baf43cf3b06e 100644
--- a/webpack_runner.js
+++ b/webpack_runner.js
@@ -19,7 +19,7 @@ process.stdin.on("data", chunk => { inputChunks.push(chunk); });
process.stdin.on("end", () =>
{
let {bundles, extension_path,
- info_module, resolve_paths} = JSON.parse(inputChunks.join(""));
+ info_module, resolve_paths, aliases} = JSON.parse(inputChunks.join(""));
// The contents of the info module is passed to us as a string from the Python
// packager and we pass it through to our custom loader now so it is available
@@ -51,17 +51,7 @@ process.stdin.on("end", () =>
},
resolve: {
modules: resolve_paths,
- alias: {
- // To use our custom loader for the info module we must first set up
- // an alias to a file that exists.
- info$: path.join(__dirname, "info.js"),
- // Prevent builtin Node.js modules from being used instead of our own
- // when the names clash. Once relative paths are used this won't be
- // necessary.
- url$: "url.js",
- events$: "events.js",
- punycode$: "punycode.js"
- },
+ alias: aliases,
plugins: [
function()
{
« tests/metadata.edge ('K') | « tests/test_packagerWebExt.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld