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

Side by Side Diff: webpack_runner.js

Issue 29656586: Issue 6230 - Alter resolve path of generated info module (Closed)
Patch Set: Created Jan. 4, 2018, 2:36 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « info.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-present eyeo GmbH 3 * Copyright (C) 2006-present eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 // larger than actually producing bundles we avoid paying it multiple times, 43 // larger than actually producing bundles we avoid paying it multiple times,
44 // instead producing all the bundles in one go. 44 // instead producing all the bundles in one go.
45 let options = []; 45 let options = [];
46 for (let {bundle_name, entry_points} of bundles) 46 for (let {bundle_name, entry_points} of bundles)
47 { 47 {
48 options.push({ 48 options.push({
49 context: extension_path, 49 context: extension_path,
50 devtool: "source-map", 50 devtool: "source-map",
51 module: { 51 module: {
52 rules: [{ 52 rules: [{
53 include: path.join(__dirname, "info.js"), 53 include: path.join(extension_path, "lib", "info.js"),
54 use: ["info-loader"] 54 use: ["info-loader"]
55 }] 55 }]
56 }, 56 },
57 entry: entry_points, 57 entry: entry_points,
58 output: { 58 output: {
59 path: path.resolve(""), 59 path: path.resolve(""),
60 filename: bundle_name 60 filename: bundle_name
61 }, 61 },
62 node: { 62 node: {
63 global: false 63 global: false
64 }, 64 },
65 resolve: { 65 resolve: {
66 modules: resolve_paths, 66 modules: resolve_paths,
67 alias: { 67 alias: {
68 // To use our custom loader for the info module we must first set up 68 // To use our custom loader for the info module we must first set up
69 // an alias to a file that exists. 69 // an alias to a file that exists.
70 info$: path.join(__dirname, "info.js"), 70 info$: path.join(extension_path, "lib", "info.js"),
71 // Prevent builtin Node.js modules from being used instead of our own 71 // Prevent builtin Node.js modules from being used instead of our own
72 // when the names clash. Once relative paths are used this won't be 72 // when the names clash. Once relative paths are used this won't be
73 // necessary. 73 // necessary.
74 url$: "url.js", 74 url$: "url.js",
75 events$: "events.js", 75 events$: "events.js",
76 punycode$: "punycode.js" 76 punycode$: "punycode.js"
77 }, 77 },
78 plugins: [ 78 plugins: [
79 function() 79 function()
80 { 80 {
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 included.add(path.relative(extension_path, module.name)); 162 included.add(path.relative(extension_path, module.name));
163 } 163 }
164 } 164 }
165 } 165 }
166 output.included = Array.from(included); 166 output.included = Array.from(included);
167 167
168 console.log(JSON.stringify(output)); 168 console.log(JSON.stringify(output));
169 } 169 }
170 }); 170 });
171 }); 171 });
OLDNEW
« no previous file with comments | « info.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld