webpack 4.32.2 → 4.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -390,7 +390,8 @@ export interface WebpackOptions {
|
|
390
390
|
| "async-node"
|
391
391
|
| "node-webkit"
|
392
392
|
| "electron-main"
|
393
|
-
| "electron-renderer"
|
393
|
+
| "electron-renderer"
|
394
|
+
| "electron-preload")
|
394
395
|
| ((compiler: import("../lib/Compiler")) => void);
|
395
396
|
/**
|
396
397
|
* Enter watch mode, which rebuilds on file change.
|
@@ -290,7 +290,7 @@ module.exports = function() {
|
|
290
290
|
var outdatedModules = [updateModuleId];
|
291
291
|
var outdatedDependencies = {};
|
292
292
|
|
293
|
-
var queue = outdatedModules.
|
293
|
+
var queue = outdatedModules.map(function(id) {
|
294
294
|
return {
|
295
295
|
chain: [id],
|
296
296
|
id: id
|
@@ -467,12 +467,15 @@ module.exports = function() {
|
|
467
467
|
moduleId = outdatedModules[i];
|
468
468
|
if (
|
469
469
|
installedModules[moduleId] &&
|
470
|
-
installedModules[moduleId].hot._selfAccepted
|
471
|
-
|
470
|
+
installedModules[moduleId].hot._selfAccepted &&
|
471
|
+
// removed self-accepted modules should not be required
|
472
|
+
appliedUpdate[moduleId] !== warnUnexpectedRequire
|
473
|
+
) {
|
472
474
|
outdatedSelfAcceptedModules.push({
|
473
475
|
module: moduleId,
|
474
476
|
errorHandler: installedModules[moduleId].hot._selfAccepted
|
475
477
|
});
|
478
|
+
}
|
476
479
|
}
|
477
480
|
|
478
481
|
// Now in "dispose" phase
|
@@ -539,7 +542,7 @@ module.exports = function() {
|
|
539
542
|
}
|
540
543
|
}
|
541
544
|
|
542
|
-
//
|
545
|
+
// Now in "apply" phase
|
543
546
|
hotSetStatus("apply");
|
544
547
|
|
545
548
|
hotCurrentHash = hotUpdateNewHash;
|
@@ -156,11 +156,19 @@ class WebpackOptionsApply extends OptionsApply {
|
|
156
156
|
new LoaderTargetPlugin(options.target).apply(compiler);
|
157
157
|
break;
|
158
158
|
case "electron-renderer":
|
159
|
-
|
159
|
+
case "electron-preload":
|
160
160
|
FetchCompileWasmTemplatePlugin = require("./web/FetchCompileWasmTemplatePlugin");
|
161
161
|
NodeTargetPlugin = require("./node/NodeTargetPlugin");
|
162
162
|
ExternalsPlugin = require("./ExternalsPlugin");
|
163
|
-
|
163
|
+
if (options.target === "electron-renderer") {
|
164
|
+
JsonpTemplatePlugin = require("./web/JsonpTemplatePlugin");
|
165
|
+
new JsonpTemplatePlugin().apply(compiler);
|
166
|
+
} else if (options.target === "electron-preload") {
|
167
|
+
NodeTemplatePlugin = require("./node/NodeTemplatePlugin");
|
168
|
+
new NodeTemplatePlugin({
|
169
|
+
asyncChunkLoading: true
|
170
|
+
}).apply(compiler);
|
171
|
+
}
|
164
172
|
new FetchCompileWasmTemplatePlugin({
|
165
173
|
mangleImports: options.optimization.mangleWasmImports
|
166
174
|
}).apply(compiler);
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "webpack",
|
3
|
-
"version": "4.
|
3
|
+
"version": "4.33.0",
|
4
4
|
"author": "Tobias Koppers @sokra",
|
5
5
|
"description": "Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.",
|
6
6
|
"license": "MIT",
|
@@ -110,12 +110,12 @@
|
|
110
110
|
"test:integration": "node --max-old-space-size=4096 --trace-deprecation node_modules/jest-cli/bin/jest --testMatch \"<rootDir>/test/*.test.js\"",
|
111
111
|
"test:basic": "node --max-old-space-size=4096 --trace-deprecation node_modules/jest-cli/bin/jest --testMatch \"<rootDir>/te{st/TestCasesNormal,st/StatsTestCases,st/ConfigTestCases}.test.js\"",
|
112
112
|
"test:unit": "node --max-old-space-size=4096 --trace-deprecation node_modules/jest-cli/bin/jest --testMatch \"<rootDir>/test/*.unittest.js\"",
|
113
|
-
"travis:integration": "yarn cover:
|
114
|
-
"travis:basic": "yarn
|
115
|
-
"travis:
|
113
|
+
"travis:integration": "yarn cover:integration --ci $JEST",
|
114
|
+
"travis:basic": "yarn cover:basic --ci $JEST",
|
115
|
+
"travis:lintunit": "yarn lint && yarn cover:unit --ci $JEST",
|
116
116
|
"travis:benchmark": "yarn benchmark --ci",
|
117
|
-
"appveyor:integration": "yarn cover:
|
118
|
-
"appveyor:unit": "yarn cover:
|
117
|
+
"appveyor:integration": "yarn cover:integration --ci %JEST%",
|
118
|
+
"appveyor:unit": "yarn cover:unit --ci %JEST%",
|
119
119
|
"appveyor:benchmark": "yarn benchmark --ci",
|
120
120
|
"build:examples": "cd examples && node buildAll.js",
|
121
121
|
"pretest": "yarn lint",
|
@@ -129,9 +129,9 @@
|
|
129
129
|
"pretty": "prettier --loglevel warn --write \"*.{ts,js,json,yml,yaml}\" \"{setup,lib,bin,hot,buildin,benchmark,tooling,schemas}/**/*.{js,json}\" \"test/*.js\" \"test/{configCases,watchCases,statsCases,hotCases}/**/webpack.config.js\" \"examples/**/webpack.config.js\"",
|
130
130
|
"jest-lint": "node --max-old-space-size=4096 node_modules/jest-cli/bin/jest --testMatch \"<rootDir>/test/*.lint.js\" --no-verbose",
|
131
131
|
"benchmark": "node --max-old-space-size=4096 --trace-deprecation node_modules/jest-cli/bin/jest --testMatch \"<rootDir>/test/*.benchmark.js\" --runInBand",
|
132
|
-
"cover": "yarn cover:
|
133
|
-
"cover:init": "rimraf coverage",
|
132
|
+
"cover": "yarn cover:all && yarn cover:report",
|
134
133
|
"cover:all": "node --max-old-space-size=4096 node_modules/jest-cli/bin/jest --coverage",
|
134
|
+
"cover:basic": "node --max-old-space-size=4096 node_modules/jest-cli/bin/jest --testMatch \"<rootDir>/te{st/TestCasesNormal,st/StatsTestCases,st/ConfigTestCases}.test.js\" --coverage",
|
135
135
|
"cover:integration": "node --max-old-space-size=4096 node_modules/jest-cli/bin/jest --testMatch \"<rootDir>/test/*.test.js\" --coverage",
|
136
136
|
"cover:unit": "node --max-old-space-size=4096 node_modules/jest-cli/bin/jest --testMatch \"<rootDir>/test/*.unittest.js\" --coverage",
|
137
137
|
"cover:report": "istanbul report"
|