From 8dd3307c0892594ea8edacc6049186eb98374cc3 Mon Sep 17 00:00:00 2001 From: shellscape Date: Thu, 11 Jan 2018 11:15:26 -0500 Subject: [PATCH 001/112] ensures the HMRPlugin assigns module.hot before NodeStuffPlugin --- lib/HotModuleReplacementPlugin.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/HotModuleReplacementPlugin.js b/lib/HotModuleReplacementPlugin.js index f0eb9eac9..bdc35c4de 100644 --- a/lib/HotModuleReplacementPlugin.js +++ b/lib/HotModuleReplacementPlugin.js @@ -191,9 +191,12 @@ module.exports = class HotModuleReplacementPlugin { params.normalModuleFactory.plugin("parser", (parser, parserOptions) => { parser.plugin("expression __webpack_hash__", ParserHelpers.toConstantDependency("__webpack_require__.h()")); parser.plugin("evaluate typeof __webpack_hash__", ParserHelpers.evaluateToString("string")); - parser.plugin("evaluate Identifier module.hot", function(expr) { - return ParserHelpers.evaluateToIdentifier("module.hot", !!this.state.compilation.hotUpdateChunkTemplate)(expr); - }); + parser.hooks.evaluateIdentifier.for("module.hot").tap({ + name: "HotModuleReplacementPlugin", + before: "NodeStuffPlugin" + }, expr => { + return ParserHelpers.evaluateToIdentifier("module.hot", !!parser.state.compilation.hotUpdateChunkTemplate)(expr); + }); parser.plugin("call module.hot.accept", function(expr) { if(!this.state.compilation.hotUpdateChunkTemplate) return false; if(expr.arguments.length >= 1) { From 2ef4b0101e06e3ad81638ea97be24aec165dd001 Mon Sep 17 00:00:00 2001 From: Jeremy Greer Date: Thu, 18 Jan 2018 10:14:19 -0600 Subject: [PATCH 002/112] Add support for sideEffects glob(s) In addition to Booleans, the `sideEffects` value in a package can identify child modules with side effects by a glob or Array of globs. --- lib/optimize/SideEffectsFlagPlugin.js | 18 ++++++++-- package.json | 1 + test/SideEffectsFlagPlugin.unittest.js | 33 +++++++++++++++++++ .../side-effects/side-effects-values/index.js | 18 ++++++++++ .../node_modules/boolean-value-module/a.js | 8 +++++ .../node_modules/boolean-value-module/b.js | 8 +++++ .../node_modules/boolean-value-module/c.js | 6 ++++ .../boolean-value-module/index.js | 7 ++++ .../boolean-value-module/package.json | 3 ++ .../boolean-value-module/tracker.js | 10 ++++++ .../node_modules/glob-value-module/a.js | 6 ++++ .../node_modules/glob-value-module/b.js | 8 +++++ .../node_modules/glob-value-module/index.js | 8 +++++ .../glob-value-module/package.json | 5 +++ .../node_modules/glob-value-module/src/a.js | 6 ++++ .../node_modules/glob-value-module/tracker.js | 10 ++++++ .../side-effects-values/webpack.config.js | 7 ++++ yarn.lock | 4 +++ 18 files changed, 164 insertions(+), 2 deletions(-) create mode 100644 test/SideEffectsFlagPlugin.unittest.js create mode 100644 test/configCases/side-effects/side-effects-values/index.js create mode 100644 test/configCases/side-effects/side-effects-values/node_modules/boolean-value-module/a.js create mode 100644 test/configCases/side-effects/side-effects-values/node_modules/boolean-value-module/b.js create mode 100644 test/configCases/side-effects/side-effects-values/node_modules/boolean-value-module/c.js create mode 100644 test/configCases/side-effects/side-effects-values/node_modules/boolean-value-module/index.js create mode 100644 test/configCases/side-effects/side-effects-values/node_modules/boolean-value-module/package.json create mode 100644 test/configCases/side-effects/side-effects-values/node_modules/boolean-value-module/tracker.js create mode 100644 test/configCases/side-effects/side-effects-values/node_modules/glob-value-module/a.js create mode 100644 test/configCases/side-effects/side-effects-values/node_modules/glob-value-module/b.js create mode 100644 test/configCases/side-effects/side-effects-values/node_modules/glob-value-module/index.js create mode 100644 test/configCases/side-effects/side-effects-values/node_modules/glob-value-module/package.json create mode 100644 test/configCases/side-effects/side-effects-values/node_modules/glob-value-module/src/a.js create mode 100644 test/configCases/side-effects/side-effects-values/node_modules/glob-value-module/tracker.js create mode 100644 test/configCases/side-effects/side-effects-values/webpack.config.js diff --git a/lib/optimize/SideEffectsFlagPlugin.js b/lib/optimize/SideEffectsFlagPlugin.js index 10b2fb071..85ba09b7c 100644 --- a/lib/optimize/SideEffectsFlagPlugin.js +++ b/lib/optimize/SideEffectsFlagPlugin.js @@ -4,6 +4,7 @@ */ "use strict"; +const globRegex = require("glob-regex"); const HarmonyExportImportedSpecifierDependency = require("../dependencies/HarmonyExportImportedSpecifierDependency"); const HarmonyImportSideEffectDependency = require("../dependencies/HarmonyImportSideEffectDependency"); const HarmonyImportSpecifierDependency = require("../dependencies/HarmonyImportSpecifierDependency"); @@ -15,8 +16,8 @@ class SideEffectsFlagPlugin { const resolveData = data.resourceResolveData; if(resolveData && resolveData.descriptionFileData && resolveData.relativePath) { const sideEffects = resolveData.descriptionFileData.sideEffects; - const isSideEffectFree = sideEffects === false; // TODO allow more complex expressions - if(isSideEffectFree) { + const hasSideEffects = SideEffectsFlagPlugin.moduleHasSideEffects(resolveData.relativePath, sideEffects); + if(!hasSideEffects) { module.factoryMeta.sideEffectFree = true; } } @@ -117,5 +118,18 @@ class SideEffectsFlagPlugin { }); }); } + + static moduleHasSideEffects(moduleName, flagValue) { + switch(typeof flagValue) { + case "undefined": + return true; + case "boolean": + return flagValue; + case "string": + return globRegex(flagValue).test(moduleName); + case "object": + return flagValue.some(glob => SideEffectsFlagPlugin.moduleHasSideEffects(moduleName, glob)); + } + } } module.exports = SideEffectsFlagPlugin; diff --git a/package.json b/package.json index 7d28740e3..1b4868448 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "async": "^2.1.2", "enhanced-resolve": "^4.0.0-beta.2", "eslint-scope": "^3.7.1", + "glob-regex": "^0.2.2", "loader-runner": "^2.3.0", "loader-utils": "^1.1.0", "memory-fs": "~0.4.1", diff --git a/test/SideEffectsFlagPlugin.unittest.js b/test/SideEffectsFlagPlugin.unittest.js new file mode 100644 index 000000000..aea8a1c05 --- /dev/null +++ b/test/SideEffectsFlagPlugin.unittest.js @@ -0,0 +1,33 @@ +"use strict"; + +const SideEffectsFlagPlugin = require("../lib/optimize/SideEffectsFlagPlugin"); + +describe("SideEffectsFlagPlugin", () => { + it("should assume true", () => { + SideEffectsFlagPlugin.moduleHasSideEffects("./foo/bar.js", undefined).should.eql(true); + }); + + it("should understand boolean values", () => { + SideEffectsFlagPlugin.moduleHasSideEffects("./foo/bar.js", true).should.eql(true); + SideEffectsFlagPlugin.moduleHasSideEffects("./foo/bar.js", false).should.eql(false); + }); + + it("should understand a glob", () => { + SideEffectsFlagPlugin.moduleHasSideEffects("./src/x/y/z.js", "./src/**/*.js").should.eql(true); + SideEffectsFlagPlugin.moduleHasSideEffects("./x.js", "./src/**/*.js").should.eql(false); + SideEffectsFlagPlugin.moduleHasSideEffects("./src/x/y/z.js", "**.js").should.eql(true); + SideEffectsFlagPlugin.moduleHasSideEffects("./src/x/y/z.js", "./src**").should.eql(true); + SideEffectsFlagPlugin.moduleHasSideEffects("./src/x/y/z.js", "./src/**/z.js").should.eql(true); + SideEffectsFlagPlugin.moduleHasSideEffects("./src/x/y/z.js", "**/x/**/z.js").should.eql(true); + }); + + it("should understand arrays", () => { + const array = [ + "./src/**/*.js", + "./dirty.js", + ]; + SideEffectsFlagPlugin.moduleHasSideEffects("./src/x/y/z.js", array).should.eql(true); + SideEffectsFlagPlugin.moduleHasSideEffects("./dirty.js", array).should.eql(true); + SideEffectsFlagPlugin.moduleHasSideEffects("./clean.js", array).should.eql(false); + }); +}); diff --git a/test/configCases/side-effects/side-effects-values/index.js b/test/configCases/side-effects/side-effects-values/index.js new file mode 100644 index 000000000..1e8a69e2a --- /dev/null +++ b/test/configCases/side-effects/side-effects-values/index.js @@ -0,0 +1,18 @@ +import { log as booleanValueModuleLog } from "boolean-value-module/tracker"; +import booleanValueModule from "boolean-value-module"; +import { log as globValueModuleLog } from "glob-value-module/tracker"; +import globValueModule from "glob-value-module"; + +it("should handle a boolean", function() { + booleanValueModule.should.be.eql("def"); + booleanValueModuleLog.should.be.eql(["index.js"]); +}); + +it("should handle globs", function() { + globValueModule.should.be.eql("def"); + globValueModuleLog.should.be.eql([ + "./src/a.js", + "a.js", + "index.js", + ]); +}); diff --git a/test/configCases/side-effects/side-effects-values/node_modules/boolean-value-module/a.js b/test/configCases/side-effects/side-effects-values/node_modules/boolean-value-module/a.js new file mode 100644 index 000000000..515d49e6a --- /dev/null +++ b/test/configCases/side-effects/side-effects-values/node_modules/boolean-value-module/a.js @@ -0,0 +1,8 @@ +var a = "a"; +var b = "b"; +var c = "c"; + +export { a, b, c }; + +import { track } from "./tracker"; +track("a.js"); diff --git a/test/configCases/side-effects/side-effects-values/node_modules/boolean-value-module/b.js b/test/configCases/side-effects/side-effects-values/node_modules/boolean-value-module/b.js new file mode 100644 index 000000000..239bde672 --- /dev/null +++ b/test/configCases/side-effects/side-effects-values/node_modules/boolean-value-module/b.js @@ -0,0 +1,8 @@ +var x = "x"; +var y = "y"; + +export { x, y }; +export { z } from "./c"; + +import { track } from "./tracker"; +track("b.js"); diff --git a/test/configCases/side-effects/side-effects-values/node_modules/boolean-value-module/c.js b/test/configCases/side-effects/side-effects-values/node_modules/boolean-value-module/c.js new file mode 100644 index 000000000..06d472502 --- /dev/null +++ b/test/configCases/side-effects/side-effects-values/node_modules/boolean-value-module/c.js @@ -0,0 +1,6 @@ +var z = "z"; + +export { z }; + +import { track } from "./tracker"; +track("c.js"); diff --git a/test/configCases/side-effects/side-effects-values/node_modules/boolean-value-module/index.js b/test/configCases/side-effects/side-effects-values/node_modules/boolean-value-module/index.js new file mode 100644 index 000000000..c7b32fec3 --- /dev/null +++ b/test/configCases/side-effects/side-effects-values/node_modules/boolean-value-module/index.js @@ -0,0 +1,7 @@ +export * from "./a"; +export { x, y, z } from "./b"; + +import { track } from "./tracker"; +track("index.js"); + +export default "def"; diff --git a/test/configCases/side-effects/side-effects-values/node_modules/boolean-value-module/package.json b/test/configCases/side-effects/side-effects-values/node_modules/boolean-value-module/package.json new file mode 100644 index 000000000..43c38c1bb --- /dev/null +++ b/test/configCases/side-effects/side-effects-values/node_modules/boolean-value-module/package.json @@ -0,0 +1,3 @@ +{ + "sideEffects": false +} diff --git a/test/configCases/side-effects/side-effects-values/node_modules/boolean-value-module/tracker.js b/test/configCases/side-effects/side-effects-values/node_modules/boolean-value-module/tracker.js new file mode 100644 index 000000000..42b014d4f --- /dev/null +++ b/test/configCases/side-effects/side-effects-values/node_modules/boolean-value-module/tracker.js @@ -0,0 +1,10 @@ +export function track(file) { + log.push(file); + log.sort(); +} + +export var log = []; + +export function reset() { + log.length = 0; +} diff --git a/test/configCases/side-effects/side-effects-values/node_modules/glob-value-module/a.js b/test/configCases/side-effects/side-effects-values/node_modules/glob-value-module/a.js new file mode 100644 index 000000000..4f3a684b3 --- /dev/null +++ b/test/configCases/side-effects/side-effects-values/node_modules/glob-value-module/a.js @@ -0,0 +1,6 @@ +var z = "z"; + +export { z }; + +import { track } from "./tracker"; +track("a.js"); diff --git a/test/configCases/side-effects/side-effects-values/node_modules/glob-value-module/b.js b/test/configCases/side-effects/side-effects-values/node_modules/glob-value-module/b.js new file mode 100644 index 000000000..f2f6cd7df --- /dev/null +++ b/test/configCases/side-effects/side-effects-values/node_modules/glob-value-module/b.js @@ -0,0 +1,8 @@ +var x = "x"; +var y = "y"; + +export { x, y }; +export { z } from "./a"; + +import { track } from "./tracker"; +track("b.js"); diff --git a/test/configCases/side-effects/side-effects-values/node_modules/glob-value-module/index.js b/test/configCases/side-effects/side-effects-values/node_modules/glob-value-module/index.js new file mode 100644 index 000000000..dbeaaf657 --- /dev/null +++ b/test/configCases/side-effects/side-effects-values/node_modules/glob-value-module/index.js @@ -0,0 +1,8 @@ +import * as a from "./a"; +import * as a2 from "./src/a"; +import * as b from "./b"; + +import { track } from "./tracker"; +track("index.js"); + +export default "def"; diff --git a/test/configCases/side-effects/side-effects-values/node_modules/glob-value-module/package.json b/test/configCases/side-effects/side-effects-values/node_modules/glob-value-module/package.json new file mode 100644 index 000000000..734907539 --- /dev/null +++ b/test/configCases/side-effects/side-effects-values/node_modules/glob-value-module/package.json @@ -0,0 +1,5 @@ +{ + "sideEffects": [ + "**/a.js" + ] +} diff --git a/test/configCases/side-effects/side-effects-values/node_modules/glob-value-module/src/a.js b/test/configCases/side-effects/side-effects-values/node_modules/glob-value-module/src/a.js new file mode 100644 index 000000000..36090b93a --- /dev/null +++ b/test/configCases/side-effects/side-effects-values/node_modules/glob-value-module/src/a.js @@ -0,0 +1,6 @@ +var a = "a"; + +export { a }; + +import { track } from "../tracker"; +track("./src/a.js"); diff --git a/test/configCases/side-effects/side-effects-values/node_modules/glob-value-module/tracker.js b/test/configCases/side-effects/side-effects-values/node_modules/glob-value-module/tracker.js new file mode 100644 index 000000000..42b014d4f --- /dev/null +++ b/test/configCases/side-effects/side-effects-values/node_modules/glob-value-module/tracker.js @@ -0,0 +1,10 @@ +export function track(file) { + log.push(file); + log.sort(); +} + +export var log = []; + +export function reset() { + log.length = 0; +} diff --git a/test/configCases/side-effects/side-effects-values/webpack.config.js b/test/configCases/side-effects/side-effects-values/webpack.config.js new file mode 100644 index 000000000..57e6aa095 --- /dev/null +++ b/test/configCases/side-effects/side-effects-values/webpack.config.js @@ -0,0 +1,7 @@ +module.exports = { + mode: "production", + module: { + rules: [ + ] + } +}; diff --git a/yarn.lock b/yarn.lock index f0f6d03b0..2e55b2717 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1608,6 +1608,10 @@ glob-parent@^2.0.0: dependencies: is-glob "^2.0.0" +glob-regex@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/glob-regex/-/glob-regex-0.2.2.tgz#43dc4b0d986a394c7770a99802367d8300370977" + glob@7.1.1: version "7.1.1" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8" From 5c63d3cb4311ab7a6867a0d0426edd459facc376 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Tue, 23 Jan 2018 23:09:26 +0100 Subject: [PATCH 003/112] move source generation into separate module allow to pass a Generator to NormalModule change NormalModule constructor to options object :eggplant: --- lib/JavascriptGenerator.js | 186 ++++++++++++++++++++++++++++++ lib/JavascriptModulesPlugin.js | 10 ++ lib/JsonGenerator.js | 35 ++++++ lib/JsonModulesPlugin.js | 30 +---- lib/NormalModule.js | 197 ++++---------------------------- lib/NormalModuleFactory.js | 38 ++++-- lib/WebAssemblyGenerator.js | 13 +++ lib/WebAssemblyModulesPlugin.js | 5 + test/NormalModule.unittest.js | 78 +++---------- 9 files changed, 318 insertions(+), 274 deletions(-) create mode 100644 lib/JavascriptGenerator.js create mode 100644 lib/JsonGenerator.js create mode 100644 lib/WebAssemblyGenerator.js diff --git a/lib/JavascriptGenerator.js b/lib/JavascriptGenerator.js new file mode 100644 index 000000000..19ac2857c --- /dev/null +++ b/lib/JavascriptGenerator.js @@ -0,0 +1,186 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +"use strict"; + +const RawSource = require("webpack-sources").RawSource; +const ReplaceSource = require("webpack-sources").ReplaceSource; + +// TODO: clean up this file +// replace with newer constructs + +// TODO: remove DependencyVariables and replace them with something better + +class JavascriptGenerator { + + generate(module, dependencyTemplates, runtimeTemplate) { + const originalSource = module.originalSource(); + if(!originalSource) { + return new RawSource("throw new Error('No source available');"); + } + + const source = new ReplaceSource(originalSource); + + this.sourceBlock(module, module, [], dependencyTemplates, source, runtimeTemplate); + + return source; + } + + sourceBlock(module, block, availableVars, dependencyTemplates, source, runtimeTemplate) { + for(const dependency of block.dependencies) { + this.sourceDependency(dependency, dependencyTemplates, source, runtimeTemplate); + } + + /** + * Get the variables of all blocks that we need to inject. + * These will contain the variable name and its expression. + * The name will be added as a paramter in a IIFE the expression as its value. + */ + const vars = block.variables.reduce((result, value) => { + const variable = this.sourceVariables( + value, availableVars, dependencyTemplates, runtimeTemplate); + + if(variable) { + result.push(variable); + } + + return result; + }, []); + + /** + * if we actually have variables + * this is important as how #splitVariablesInUniqueNamedChunks works + * it will always return an array in an array which would lead to a IIFE wrapper around + * a module if we do this with an empty vars array. + */ + if(vars.length > 0) { + /** + * Split all variables up into chunks of unique names. + * e.g. imagine you have the following variable names that need to be injected: + * [foo, bar, baz, foo, some, more] + * we can not inject "foo" twice, therefore we just make two IIFEs like so: + * (function(foo, bar, baz){ + * (function(foo, some, more){ + * ... + * }(...)); + * }(...)); + * + * "splitVariablesInUniqueNamedChunks" splits the variables shown above up to this: + * [[foo, bar, baz], [foo, some, more]] + */ + const injectionVariableChunks = this.splitVariablesInUniqueNamedChunks(vars); + + // create all the beginnings of IIFEs + const functionWrapperStarts = injectionVariableChunks.map((variableChunk) => { + return this.variableInjectionFunctionWrapperStartCode( + variableChunk.map(variable => variable.name) + ); + }); + + // and all the ends + const functionWrapperEnds = injectionVariableChunks.map((variableChunk) => { + return this.variableInjectionFunctionWrapperEndCode( + module, + variableChunk.map(variable => variable.expression), block + ); + }); + + // join them to one big string + const varStartCode = functionWrapperStarts.join(""); + + // reverse the ends first before joining them, as the last added must be the inner most + const varEndCode = functionWrapperEnds.reverse().join(""); + + // if we have anything, add it to the source + if(varStartCode && varEndCode) { + const start = block.range ? block.range[0] : -10; + const end = block.range ? block.range[1] : (module.originalSource().size() + 1); + source.insert(start + 0.5, varStartCode); + source.insert(end + 0.5, "\n/* WEBPACK VAR INJECTION */" + varEndCode); + } + } + + for(const childBlock of block.blocks) { + this.sourceBlock( + module, + childBlock, + availableVars.concat(vars), + dependencyTemplates, + source, + runtimeTemplate + ); + } + } + + sourceDependency(dependency, dependencyTemplates, source, runtimeTemplate) { + const template = dependencyTemplates.get(dependency.constructor); + if(!template) throw new Error("No template for dependency: " + dependency.constructor.name); + template.apply(dependency, source, runtimeTemplate, dependencyTemplates); + } + + sourceVariables(variable, availableVars, dependencyTemplates, runtimeTemplate) { + const name = variable.name; + const expr = variable.expressionSource(dependencyTemplates, runtimeTemplate); + + if(availableVars.some(v => v.name === name && v.expression.source() === expr.source())) { + return; + } + return { + name: name, + expression: expr + }; + } + + /* + * creates the start part of a IIFE around the module to inject a variable name + * (function(...){ <- this part + * }.call(...)) + */ + variableInjectionFunctionWrapperStartCode(varNames) { + const args = varNames.join(", "); + return `/* WEBPACK VAR INJECTION */(function(${args}) {`; + } + + contextArgument(module, block) { + if(this === block) { + return module.exportsArgument; + } + return "this"; + } + + /* + * creates the end part of a IIFE around the module to inject a variable name + * (function(...){ + * }.call(...)) <- this part + */ + variableInjectionFunctionWrapperEndCode(module, varExpressions, block) { + const firstParam = this.contextArgument(module, block); + const furtherParams = varExpressions.map(e => e.source()).join(", "); + return `}.call(${firstParam}, ${furtherParams}))`; + } + + splitVariablesInUniqueNamedChunks(vars) { + const startState = [ + [] + ]; + return vars.reduce((chunks, variable) => { + const current = chunks[chunks.length - 1]; + // check if variable with same name exists already + // if so create a new chunk of variables. + const variableNameAlreadyExists = current.some(v => v.name === variable.name); + + if(variableNameAlreadyExists) { + // start new chunk with current variable + chunks.push([variable]); + } else { + // else add it to current chunk + current.push(variable); + } + return chunks; + }, startState); + } + +} + +module.exports = JavascriptGenerator; diff --git a/lib/JavascriptModulesPlugin.js b/lib/JavascriptModulesPlugin.js index 7fb08c5e9..1f0899380 100644 --- a/lib/JavascriptModulesPlugin.js +++ b/lib/JavascriptModulesPlugin.js @@ -7,6 +7,7 @@ const Parser = require("./Parser"); const Template = require("./Template"); const ConcatSource = require("webpack-sources").ConcatSource; +const JavascriptGenerator = require("./JavascriptGenerator"); class JavascriptModulesPlugin { apply(compiler) { @@ -22,6 +23,15 @@ class JavascriptModulesPlugin { normalModuleFactory.hooks.createParser.for("javascript/esm").tap("JavascriptModulesPlugin", options => { return new Parser(options, "module"); }); + normalModuleFactory.hooks.createGenerator.for("javascript/auto").tap("JavascriptModulesPlugin", options => { + return new JavascriptGenerator(options); + }); + normalModuleFactory.hooks.createGenerator.for("javascript/dynamic").tap("JavascriptModulesPlugin", options => { + return new JavascriptGenerator(options); + }); + normalModuleFactory.hooks.createGenerator.for("javascript/esm").tap("JavascriptModulesPlugin", options => { + return new JavascriptGenerator(options); + }); compilation.mainTemplate.hooks.renderManifest.tap("JavascriptModulesPlugin", (result, options) => { const chunk = options.chunk; const hash = options.hash; diff --git a/lib/JsonGenerator.js b/lib/JsonGenerator.js new file mode 100644 index 000000000..b5cd17c78 --- /dev/null +++ b/lib/JsonGenerator.js @@ -0,0 +1,35 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +"use strict"; + +const ConcatSource = require("webpack-sources").ConcatSource; + +const stringifySafe = data => JSON.stringify(data) + .replace(/\u2028|\u2029/g, str => str === "\u2029" ? "\\u2029" : "\\u2028"); // invalid in JavaScript but valid JSON + +class JsonGenerator { + generate(module, dependencyTemplates, runtimeTemplate) { + const source = new ConcatSource(); + const data = module.buildInfo.jsonData; + if(Array.isArray(module.buildMeta.providedExports) && !module.isUsed("default")) { + // Only some exports are used: We can optimize here, by only generating a part of the JSON + const reducedJson = {}; + for(const exportName of module.buildMeta.providedExports) { + if(exportName === "default") + continue; + const used = module.isUsed(exportName); + if(used) { + reducedJson[used] = data[exportName]; + } + } + source.add(`${module.moduleArgument}.exports = ${stringifySafe(reducedJson)};`); + } else { + source.add(`${module.moduleArgument}.exports = ${stringifySafe(data)};`); + } + return source; + } +} + +module.exports = JsonGenerator; diff --git a/lib/JsonModulesPlugin.js b/lib/JsonModulesPlugin.js index 8b717d9d8..c32d13943 100644 --- a/lib/JsonModulesPlugin.js +++ b/lib/JsonModulesPlugin.js @@ -5,10 +5,7 @@ "use strict"; const JsonParser = require("./JsonParser"); -const ConcatSource = require("webpack-sources").ConcatSource; - -const stringifySafe = data => JSON.stringify(data) - .replace(/\u2028|\u2029/g, str => str === "\u2029" ? "\\u2029" : "\\u2028"); // invalid in JavaScript but valid JSON +const JsonGenerator = require("./JsonGenerator"); class JsonModulesPlugin { apply(compiler) { @@ -18,29 +15,8 @@ class JsonModulesPlugin { normalModuleFactory.hooks.createParser.for("json").tap("JsonModulesPlugin", () => { return new JsonParser(); }); - compilation.moduleTemplates.javascript.hooks.content.tap("JsonModulesPlugin", (moduleSource, module) => { - if(module.type && module.type.startsWith("json")) { - const source = new ConcatSource(); - const data = module.buildInfo.jsonData; - if(Array.isArray(module.buildMeta.providedExports) && !module.isUsed("default")) { - // Only some exports are used: We can optimize here, by only generating a part of the JSON - const reducedJson = {}; - for(const exportName of module.buildMeta.providedExports) { - if(exportName === "default") - continue; - const used = module.isUsed(exportName); - if(used) { - reducedJson[used] = data[exportName]; - } - } - source.add(`${module.moduleArgument}.exports = ${stringifySafe(reducedJson)};`); - } else { - source.add(`${module.moduleArgument}.exports = ${stringifySafe(data)};`); - } - return source; - } else { - return moduleSource; - } + normalModuleFactory.hooks.createGenerator.for("json").tap("JsonModulesPlugin", () => { + return new JsonGenerator(); }); }); } diff --git a/lib/NormalModule.js b/lib/NormalModule.js index 980bfea07..5f956c958 100644 --- a/lib/NormalModule.js +++ b/lib/NormalModule.js @@ -10,7 +10,6 @@ const NativeModule = require("module"); const SourceMapSource = require("webpack-sources").SourceMapSource; const OriginalSource = require("webpack-sources").OriginalSource; const RawSource = require("webpack-sources").RawSource; -const ReplaceSource = require("webpack-sources").ReplaceSource; const CachedSource = require("webpack-sources").CachedSource; const LineToLineMappedSource = require("webpack-sources").LineToLineMappedSource; @@ -65,7 +64,17 @@ const dependencyTemplatesHashMap = new WeakMap(); class NormalModule extends Module { - constructor(type, request, userRequest, rawRequest, loaders, resource, parser, resolveOptions) { + constructor({ + type, + request, + userRequest, + rawRequest, + loaders, + resource, + parser, + generator, + resolveOptions + }) { super(type); // Info from Factory @@ -74,6 +83,7 @@ class NormalModule extends Module { this.rawRequest = rawRequest; this.binary = type.startsWith("webassembly"); this.parser = parser; + this.generator = generator; this.resource = resource; this.context = getContext(resource); this.loaders = loaders; @@ -353,180 +363,19 @@ class NormalModule extends Module { return `${this.hash}-${dtHash}`; } - sourceDependency(dependency, dependencyTemplates, source, runtimeTemplate) { - const template = dependencyTemplates.get(dependency.constructor); - if(!template) throw new Error("No template for dependency: " + dependency.constructor.name); - template.apply(dependency, source, runtimeTemplate, dependencyTemplates); - } - - sourceVariables(variable, availableVars, dependencyTemplates, runtimeTemplate) { - const name = variable.name; - const expr = variable.expressionSource(dependencyTemplates, runtimeTemplate); - - if(availableVars.some(v => v.name === name && v.expression.source() === expr.source())) { - return; - } - return { - name: name, - expression: expr - }; - } - - /* - * creates the start part of a IIFE around the module to inject a variable name - * (function(...){ <- this part - * }.call(...)) - */ - variableInjectionFunctionWrapperStartCode(varNames) { - const args = varNames.join(", "); - return `/* WEBPACK VAR INJECTION */(function(${args}) {`; - } - - contextArgument(block) { - if(this === block) { - return this.exportsArgument; - } - return "this"; - } - - /* - * creates the end part of a IIFE around the module to inject a variable name - * (function(...){ - * }.call(...)) <- this part - */ - variableInjectionFunctionWrapperEndCode(varExpressions, block) { - const firstParam = this.contextArgument(block); - const furtherParams = varExpressions.map(e => e.source()).join(", "); - return `}.call(${firstParam}, ${furtherParams}))`; - } - - splitVariablesInUniqueNamedChunks(vars) { - const startState = [ - [] - ]; - return vars.reduce((chunks, variable) => { - const current = chunks[chunks.length - 1]; - // check if variable with same name exists already - // if so create a new chunk of variables. - const variableNameAlreadyExists = current.some(v => v.name === variable.name); - - if(variableNameAlreadyExists) { - // start new chunk with current variable - chunks.push([variable]); - } else { - // else add it to current chunk - current.push(variable); - } - return chunks; - }, startState); - } - - sourceBlock(block, availableVars, dependencyTemplates, source, runtimeTemplate) { - for(const dependency of block.dependencies) { - this.sourceDependency(dependency, dependencyTemplates, source, runtimeTemplate); - } - - /** - * Get the variables of all blocks that we need to inject. - * These will contain the variable name and its expression. - * The name will be added as a paramter in a IIFE the expression as its value. - */ - const vars = block.variables.reduce((result, value) => { - const variable = this.sourceVariables( - value, availableVars, dependencyTemplates, runtimeTemplate); - - if(variable) { - result.push(variable); - } - - return result; - }, []); - - /** - * if we actually have variables - * this is important as how #splitVariablesInUniqueNamedChunks works - * it will always return an array in an array which would lead to a IIFE wrapper around - * a module if we do this with an empty vars array. - */ - if(vars.length > 0) { - /** - * Split all variables up into chunks of unique names. - * e.g. imagine you have the following variable names that need to be injected: - * [foo, bar, baz, foo, some, more] - * we can not inject "foo" twice, therefore we just make two IIFEs like so: - * (function(foo, bar, baz){ - * (function(foo, some, more){ - * ... - * }(...)); - * }(...)); - * - * "splitVariablesInUniqueNamedChunks" splits the variables shown above up to this: - * [[foo, bar, baz], [foo, some, more]] - */ - const injectionVariableChunks = this.splitVariablesInUniqueNamedChunks(vars); - - // create all the beginnings of IIFEs - const functionWrapperStarts = injectionVariableChunks.map((variableChunk) => { - return this.variableInjectionFunctionWrapperStartCode( - variableChunk.map(variable => variable.name) - ); - }); - - // and all the ends - const functionWrapperEnds = injectionVariableChunks.map((variableChunk) => { - return this.variableInjectionFunctionWrapperEndCode( - variableChunk.map(variable => variable.expression), block - ); - }); - - // join them to one big string - const varStartCode = functionWrapperStarts.join(""); - - // reverse the ends first before joining them, as the last added must be the inner most - const varEndCode = functionWrapperEnds.reverse().join(""); - - // if we have anything, add it to the source - if(varStartCode && varEndCode) { - const start = block.range ? block.range[0] : -10; - const end = block.range ? block.range[1] : (this._source.size() + 1); - source.insert(start + 0.5, varStartCode); - source.insert(end + 0.5, "\n/* WEBPACK VAR INJECTION */" + varEndCode); - } - } - - for(const childBlock of block.blocks) { - this.sourceBlock( - childBlock, - availableVars.concat(vars), - dependencyTemplates, - source, - runtimeTemplate - ); - } - } - source(dependencyTemplates, runtimeTemplate) { - if(this.type.startsWith("javascript")) { - const hashDigest = this.getHashDigest(dependencyTemplates); - if(this._cachedSourceHash === hashDigest) { - // We can reuse the cached source - return this._cachedSource; - } - - if(!this._source) { - return new RawSource("throw new Error('No source available');"); - } - - const source = new ReplaceSource(this._source); - - this.sourceBlock(this, [], dependencyTemplates, source, runtimeTemplate); - - const cachedSource = new CachedSource(source); - this._cachedSource = cachedSource; - this._cachedSourceHash = hashDigest; - return cachedSource; + const hashDigest = this.getHashDigest(dependencyTemplates); + if(this._cachedSourceHash === hashDigest) { + // We can reuse the cached source + return this._cachedSource; } - return this._source; + + const source = this.generator.generate(this, dependencyTemplates, runtimeTemplate); + + const cachedSource = new CachedSource(source); + this._cachedSource = cachedSource; + this._cachedSourceHash = hashDigest; + return cachedSource; } originalSource() { diff --git a/lib/NormalModuleFactory.js b/lib/NormalModuleFactory.js index c184ef30d..74fb3b6e5 100644 --- a/lib/NormalModuleFactory.js +++ b/lib/NormalModuleFactory.js @@ -61,6 +61,8 @@ class NormalModuleFactory extends Tapable { module: new SyncWaterfallHook(["module", "data"]), createParser: new HookMap(() => new SyncBailHook(["parserOptions"])), parser: new HookMap(() => new SyncHook(["parser", "parserOptions"])), + createGenerator: new HookMap(() => new SyncBailHook(["generatorOptions"])), + generator: new HookMap(() => new SyncHook(["generator", "generatorOptions"])), }; this._pluginCompat.tap("NormalModuleFactory", options => { switch(options.name) { @@ -89,6 +91,7 @@ class NormalModuleFactory extends Tapable { this.cachePredicate = typeof options.unsafeCache === "function" ? options.unsafeCache : Boolean.bind(null, options.unsafeCache); this.context = context || ""; this.parserCache = Object.create(null); + this.generatorCache = Object.create(null); this.hooks.factory.tap("NormalModuleFactory", () => (result, callback) => { let resolver = this.hooks.resolver.call(null); @@ -118,16 +121,7 @@ class NormalModuleFactory extends Tapable { return callback(new Error("Empty dependency (no request)")); } - createdModule = new NormalModule( - result.type, - result.request, - result.userRequest, - result.rawRequest, - result.loaders, - result.resource, - result.parser, - result.resolveOptions - ); + createdModule = new NormalModule(result); } createdModule = this.hooks.module.call(createdModule, result); @@ -254,6 +248,7 @@ class NormalModuleFactory extends Tapable { settings, type, parser: this.getParser(type, settings.parser), + generator: this.getGenerator(type, settings.generator), resolveOptions }); }); @@ -349,6 +344,29 @@ class NormalModuleFactory extends Tapable { return parser; } + getGenerator(type, generatorOptions) { + let ident = type; + if(generatorOptions) { + if(generatorOptions.ident) + ident = `${type}|${generatorOptions.ident}`; + else + ident = JSON.stringify([type, generatorOptions]); + } + if(ident in this.generatorCache) { + return this.generatorCache[ident]; + } + return this.generatorCache[ident] = this.createGenerator(type, generatorOptions); + } + + createGenerator(type, generatorOptions = {}) { + const generator = this.hooks.createGenerator.for(type).call(generatorOptions); + if(!generator) { + throw new Error(`No generator registered for ${type}`); + } + this.hooks.generator.for(type).call(generator, generatorOptions); + return generator; + } + getResolver(type, resolveOptions) { return this.resolverFactory.get(type, resolveOptions || EMPTY_RESOLVE_OPTIONS); } diff --git a/lib/WebAssemblyGenerator.js b/lib/WebAssemblyGenerator.js new file mode 100644 index 000000000..76d718146 --- /dev/null +++ b/lib/WebAssemblyGenerator.js @@ -0,0 +1,13 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +"use strict"; + +class WebAssemblyGenerator { + generate(module) { + return module.originalSource(); + } +} + +module.exports = WebAssemblyGenerator; diff --git a/lib/WebAssemblyModulesPlugin.js b/lib/WebAssemblyModulesPlugin.js index 8cbc76149..303087b91 100644 --- a/lib/WebAssemblyModulesPlugin.js +++ b/lib/WebAssemblyModulesPlugin.js @@ -5,6 +5,7 @@ "use strict"; const WebAssemblyParser = require("./WebAssemblyParser"); +const WebAssemblyGenerator = require("./WebAssemblyGenerator"); const WebAssemblyImportDependency = require("./dependencies/WebAssemblyImportDependency"); class WebAssemblyModulesPlugin { @@ -18,6 +19,10 @@ class WebAssemblyModulesPlugin { return new WebAssemblyParser(); }); + normalModuleFactory.hooks.createGenerator.for("webassembly/experimental").tap("WebAssemblyModulesPlugin", () => { + return new WebAssemblyGenerator(); + }); + compilation.chunkTemplate.hooks.renderManifest.tap("WebAssemblyModulesPlugin", (result, options) => { const chunk = options.chunk; const outputOptions = options.outputOptions; diff --git a/test/NormalModule.unittest.js b/test/NormalModule.unittest.js index 7cf7351e9..3b272b4f5 100644 --- a/test/NormalModule.unittest.js +++ b/test/NormalModule.unittest.js @@ -25,15 +25,17 @@ describe("NormalModule", function() { parser = { parse() {} }; - normalModule = new NormalModule( - "javascript/auto", + normalModule = new NormalModule({ + type: "javascript/auto", request, userRequest, rawRequest, loaders, resource, - parser - ); + parser, + generator: null, + resolveOptions: {} + }); normalModule.buildInfo = { cacheable: true }; @@ -70,15 +72,15 @@ describe("NormalModule", function() { describe("given a userRequest containing loaders", function() { beforeEach(function() { userRequest = "some/userRequest!some/other/userRequest!some/thing/is/off/here"; - normalModule = new NormalModule( - "javascript/auto", + normalModule = new NormalModule({ + type: "javascript/auto", request, userRequest, rawRequest, loaders, resource, parser - ); + }); }); it("contextifies every path in the userRequest", function() { normalModule.libIdent({ @@ -89,15 +91,15 @@ describe("NormalModule", function() { describe("given a userRequest containing query parameters", function() { it("ignores paths in query parameters", function() { userRequest = "some/context/loader?query=foo\\bar&otherPath=testpath/other"; - normalModule = new NormalModule( - "javascript/auto", + normalModule = new NormalModule({ + type: "javascript/auto", request, userRequest, rawRequest, loaders, resource, parser - ); + }); normalModule.libIdent({ context: "some/context", }).should.eql("./loader?query=foo\\bar&otherPath=testpath/other"); @@ -113,15 +115,15 @@ describe("NormalModule", function() { const baseResource = "some/resource"; beforeEach(function() { resource = baseResource + "?some=query"; - normalModule = new NormalModule( - "javascript/auto", + normalModule = new NormalModule({ + type: "javascript/auto", request, userRequest, rawRequest, loaders, resource, parser - ); + }); }); it("return only the part before the ?-sign", function() { normalModule.nameForCondition().should.eql(baseResource); @@ -158,18 +160,6 @@ describe("NormalModule", function() { }); }); - describe("#source", function() { - describe("without the module having any source", function() { - beforeEach(function() { - normalModule._source = null; - }); - it("returns a Source containing an Error", function() { - normalModule.source().should.be.instanceOf(RawSource); - normalModule.source().source().should.eql("throw new Error('No source available');"); - }); - }); - }); - describe("#originalSource", function() { let expectedSource = "some source"; beforeEach(function() { @@ -290,44 +280,6 @@ describe("NormalModule", function() { }); }); }); - describe("#splitVariablesInUniqueNamedChunks", function() { - let variables; - beforeEach(function() { - variables = [{ - name: "foo" - }, { - name: "bar" - }, { - name: "baz" - }, { - name: "some" - }, { - name: "more" - }]; - }); - describe("given an empty array of vars", function() { - it("returns an empty array", function() { - normalModule.splitVariablesInUniqueNamedChunks([]).should.eql([ - [] - ]); - }); - }); - describe("given an array of distrinct variables", function() { - it("returns an array containing an array containing the variables", function() { - normalModule.splitVariablesInUniqueNamedChunks(variables).should.eql([variables]); - }); - }); - describe("given an array with duplicate variables", function() { - it("returns several arrays each containing only distinct variable names", function() { - normalModule.splitVariablesInUniqueNamedChunks(variables.concat(variables)).should.eql([variables, variables]); - }); - describe("and a duplicate as the last variable", function() { - it("returns correctly split distinct arrays", function() { - normalModule.splitVariablesInUniqueNamedChunks(variables.concat(variables).concat(variables[0])).should.eql([variables, variables, [variables[0]]]); - }); - }); - }); - }); describe("#applyNoParseRule", function() { let rule; From 72f904a34b0eedd425abd06c0869404a632b1b57 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Wed, 24 Jan 2018 12:00:50 +0100 Subject: [PATCH 004/112] run splitChunks and runtimeChunk only on main compiliation --- lib/optimize/RuntimeChunkPlugin.js | 2 +- lib/optimize/SplitChunksPlugin.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/optimize/RuntimeChunkPlugin.js b/lib/optimize/RuntimeChunkPlugin.js index 919ae0f9b..a004d07fb 100644 --- a/lib/optimize/RuntimeChunkPlugin.js +++ b/lib/optimize/RuntimeChunkPlugin.js @@ -8,7 +8,7 @@ module.exports = class RuntimeChunkPlugin { constructor(options) {} apply(compiler) { - compiler.hooks.compilation.tap("RuntimeChunkPlugin", compilation => { + compiler.hooks.thisCompilation.tap("RuntimeChunkPlugin", compilation => { compilation.hooks.optimizeChunksAdvanced.tap("RuntimeChunkPlugin", () => { for(const entrypoint of compilation.entrypoints.values()) { const chunk = entrypoint.getRuntimeChunk(); diff --git a/lib/optimize/SplitChunksPlugin.js b/lib/optimize/SplitChunksPlugin.js index d93f5ba1d..c5ba6f52d 100644 --- a/lib/optimize/SplitChunksPlugin.js +++ b/lib/optimize/SplitChunksPlugin.js @@ -176,7 +176,7 @@ module.exports = class SplitChunksPlugin { } apply(compiler) { - compiler.hooks.compilation.tap("SplitChunksPlugin", compilation => { + compiler.hooks.thisCompilation.tap("SplitChunksPlugin", compilation => { let alreadyOptimized = false; compilation.hooks.unseal.tap("SplitChunksPlugin", () => { alreadyOptimized = false; From 042e36aae61365b340b2dd57d7b60f04e4597c91 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Wed, 24 Jan 2018 23:23:34 +0100 Subject: [PATCH 005/112] update examples --- .../common-chunk-and-vendor-chunk/README.md | 36 +++++++++---------- examples/http2-aggressive-splitting/README.md | 2 +- examples/web-worker/README.md | 8 ++--- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/examples/common-chunk-and-vendor-chunk/README.md b/examples/common-chunk-and-vendor-chunk/README.md index bce0f04ac..9ff69104f 100644 --- a/examples/common-chunk-and-vendor-chunk/README.md +++ b/examples/common-chunk-and-vendor-chunk/README.md @@ -683,42 +683,42 @@ chunk {5} vendor.js (vendor) 54 bytes ={3}= ={0}= ={4}= ={1}= [initial] [rend Hash: 0a1b2c3d4e5f6a7b8c9d Version: webpack next Asset Size Chunks Chunk Names - vendor.js 134 bytes 0 [emitted] vendor - commons~pageB~pageC.js 97 bytes 1 [emitted] commons~pageB~pageC -commons~pageA~pageB~pageC.js 96 bytes 2 [emitted] commons~pageA~pageB~pageC +commons~pageA~pageB~pageC.js 96 bytes 0 [emitted] commons~pageA~pageB~pageC + vendor.js 134 bytes 1 [emitted] vendor + commons~pageB~pageC.js 97 bytes 2 [emitted] commons~pageB~pageC pageC.js 1.1 KiB 3 [emitted] pageC pageB.js 1.11 KiB 4 [emitted] pageB pageA.js 1.15 KiB 5 [emitted] pageA Entrypoint pageA = commons~pageA~pageB~pageC.js vendor.js pageA.js Entrypoint pageB = commons~pageA~pageB~pageC.js commons~pageB~pageC.js vendor.js pageB.js Entrypoint pageC = commons~pageA~pageB~pageC.js commons~pageB~pageC.js pageC.js -chunk {0} vendor.js (vendor) 54 bytes ={2}= ={5}= ={1}= ={4}= [initial] [rendered] split chunk (cache group: vendor) (name: vendor) - > ./pageA pageA - > ./pageB pageB - 2 modules -chunk {1} commons~pageB~pageC.js (commons~pageB~pageC) 28 bytes ={2}= ={3}= ={0}= ={4}= [initial] [rendered] split chunk (cache group: commons) (name: commons~pageB~pageC) - > ./pageC pageC - > ./pageB pageB - [1] ./utility3.js 28 bytes {1} [built] - cjs require ./utility3 [2] ./pageC.js 2:15-36 - cjs require ./utility3 [4] ./pageB.js 3:15-36 -chunk {2} commons~pageA~pageB~pageC.js (commons~pageA~pageB~pageC) 28 bytes ={1}= ={3}= ={0}= ={4}= ={5}= [initial] [rendered] split chunk (cache group: commons) (name: commons~pageA~pageB~pageC) +chunk {0} commons~pageA~pageB~pageC.js (commons~pageA~pageB~pageC) 28 bytes ={2}= ={3}= ={1}= ={4}= ={5}= [initial] [rendered] split chunk (cache group: commons) (name: commons~pageA~pageB~pageC) > ./pageC pageC > ./pageB pageB > ./pageA pageA - [0] ./utility2.js 28 bytes {2} [built] + [0] ./utility2.js 28 bytes {0} [built] cjs require ./utility2 [2] ./pageC.js 1:15-36 cjs require ./utility2 [4] ./pageB.js 2:15-36 cjs require ./utility2 [7] ./pageA.js 3:15-36 -chunk {3} pageC.js (pageC) 105 bytes ={2}= ={1}= [entry] [rendered] +chunk {1} vendor.js (vendor) 54 bytes ={0}= ={5}= ={2}= ={4}= [initial] [rendered] split chunk (cache group: vendor) (name: vendor) + > ./pageA pageA + > ./pageB pageB + 2 modules +chunk {2} commons~pageB~pageC.js (commons~pageB~pageC) 28 bytes ={0}= ={3}= ={1}= ={4}= [initial] [rendered] split chunk (cache group: commons) (name: commons~pageB~pageC) + > ./pageC pageC + > ./pageB pageB + [1] ./utility3.js 28 bytes {2} [built] + cjs require ./utility3 [2] ./pageC.js 2:15-36 + cjs require ./utility3 [4] ./pageB.js 3:15-36 +chunk {3} pageC.js (pageC) 105 bytes ={0}= ={2}= [entry] [rendered] > ./pageC pageC [2] ./pageC.js 105 bytes {3} [built] single entry ./pageC pageC -chunk {4} pageB.js (pageB) 142 bytes ={2}= ={1}= ={0}= [entry] [rendered] +chunk {4} pageB.js (pageB) 142 bytes ={0}= ={2}= ={1}= [entry] [rendered] > ./pageB pageB [4] ./pageB.js 142 bytes {4} [built] single entry ./pageB pageB -chunk {5} pageA.js (pageA) 170 bytes ={2}= ={0}= [entry] [rendered] +chunk {5} pageA.js (pageA) 170 bytes ={0}= ={1}= [entry] [rendered] > ./pageA pageA [5] ./utility1.js 28 bytes {5} [built] cjs require ./utility1 [7] ./pageA.js 2:15-36 diff --git a/examples/http2-aggressive-splitting/README.md b/examples/http2-aggressive-splitting/README.md index 0fc0a8f18..d887fa427 100644 --- a/examples/http2-aggressive-splitting/README.md +++ b/examples/http2-aggressive-splitting/README.md @@ -120,7 +120,7 @@ Hash: 0a1b2c3d4e5f6a7b8c9d Version: webpack next Asset Size Chunks Chunk Names 7a1ec67d9e4e1019836a.js 14.8 KiB 7 [emitted] -9baaf7bc0364c2600ef8.js 9.69 KiB 0 [emitted] +9baaf7bc0364c2600ef8.js 9.7 KiB 0 [emitted] cf3beff30352265c3fae.js 13.1 KiB 2 [emitted] 0bc9e49d2884c20a78ae.js 7.89 KiB 3 [emitted] 408e20e95f946dedfdd3.js 8.14 KiB 4 [emitted] diff --git a/examples/web-worker/README.md b/examples/web-worker/README.md index 339e21b0c..37ce94a45 100644 --- a/examples/web-worker/README.md +++ b/examples/web-worker/README.md @@ -349,11 +349,11 @@ Version: webpack next hash.worker.js 4.02 KiB [emitted] output.js 3.46 KiB 0 [emitted] main Entrypoint main = output.js -chunk {0} output.js (main) 326 bytes [entry] [rendered] +chunk {0} output.js (main) 332 bytes [entry] [rendered] > .\example.js main [0] (webpack)/node_modules/worker-loader/dist/cjs.js?name=hash.worker.js!./worker.js 97 bytes {0} [not cacheable] [built] cjs require worker-loader?name=hash.worker.js!./worker [1] ./example.js 1:13-66 - [1] ./example.js 229 bytes {0} [built] + [1] ./example.js 235 bytes {0} [built] single entry .\example.js main Child worker: Asset Size Chunks Chunk Names @@ -389,11 +389,11 @@ Version: webpack next hash.worker.js 919 bytes [emitted] output.js 697 bytes 0 [emitted] main Entrypoint main = output.js -chunk {0} output.js (main) 326 bytes [entry] [rendered] +chunk {0} output.js (main) 332 bytes [entry] [rendered] > .\example.js main [0] (webpack)/node_modules/worker-loader/dist/cjs.js?name=hash.worker.js!./worker.js 97 bytes {0} [not cacheable] [built] cjs require worker-loader?name=hash.worker.js!./worker [1] ./example.js 1:13-66 - [1] ./example.js 229 bytes {0} [built] + [1] ./example.js 235 bytes {0} [built] single entry .\example.js main Child worker: Asset Size Chunks Chunk Names From ae0dc62b7b4cc1ee3170c8ce3dd581ddcfa46a2a Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Wed, 24 Jan 2018 23:25:26 +0100 Subject: [PATCH 006/112] 4.0.0-beta.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 94dd81d8d..825389626 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "webpack", - "version": "4.0.0-alpha.5", + "version": "4.0.0-beta.0", "author": "Tobias Koppers @sokra", "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.", "license": "MIT", From b8815a941596c1167b3dcbdc05d082687185e8b3 Mon Sep 17 00:00:00 2001 From: Florent Cailhol Date: Thu, 25 Jan 2018 09:09:42 +0100 Subject: [PATCH 007/112] Leave top level scope when traversing Class nodes --- lib/Parser.js | 6 +++++- test/configCases/parsing/harmony-this/abc.js | 7 +++++++ test/configCases/parsing/harmony-this/index.js | 6 +++++- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/lib/Parser.js b/lib/Parser.js index 001a888f7..09f6844c5 100644 --- a/lib/Parser.js +++ b/lib/Parser.js @@ -609,9 +609,13 @@ class Parser extends Tapable { if(classy.superClass) this.walkExpression(classy.superClass); if(classy.body && classy.body.type === "ClassBody") { - for(const methodDefinition of classy.body.body) + const wasTopLevel = this.scope.topLevelScope; + this.scope.topLevelScope = false; + for(const methodDefinition of classy.body.body) { if(methodDefinition.type === "MethodDefinition") this.walkMethodDefinition(methodDefinition); + } + this.scope.topLevelScope = wasTopLevel; } } diff --git a/test/configCases/parsing/harmony-this/abc.js b/test/configCases/parsing/harmony-this/abc.js index a686631f7..613a79ea6 100644 --- a/test/configCases/parsing/harmony-this/abc.js +++ b/test/configCases/parsing/harmony-this/abc.js @@ -22,6 +22,13 @@ export class C { foo() { return this.x; } + bar(x = this.x) { + return x; + } +} + +export const extendThisClass = () => { + return class extends this.Buffer {}; } export function D() { diff --git a/test/configCases/parsing/harmony-this/index.js b/test/configCases/parsing/harmony-this/index.js index 5d3f2984e..21bfae5b4 100644 --- a/test/configCases/parsing/harmony-this/index.js +++ b/test/configCases/parsing/harmony-this/index.js @@ -1,6 +1,6 @@ "use strict"; -import d, {a, b as B, C as _C, D as _D, returnThisArrow, returnThisMember, that} from "./abc"; +import d, {a, b as B, C as _C, D as _D, extendThisClass, returnThisArrow, returnThisMember, that} from "./abc"; import * as abc from "./abc"; @@ -15,10 +15,14 @@ it("should have this = undefined on harmony modules", function() { (function() { abc.returnThisMember(); }).should.throw(); + (function() { + extendThisClass(); + }).should.throw(); }); it("should not break classes and functions", function() { (new _C).foo().should.be.eql("bar"); + (new _C).bar().should.be.eql("bar"); (new _D).prop().should.be.eql("ok"); }); From af8de036b222bd091852b54c997e473a4fd27afd Mon Sep 17 00:00:00 2001 From: Thibaut Dutartre Date: Thu, 25 Jan 2018 13:56:50 +0100 Subject: [PATCH 008/112] Transform done hook into async --- lib/Compiler.js | 25 ++++++++++++++++--------- lib/Watching.js | 25 ++++++++++++++----------- 2 files changed, 30 insertions(+), 20 deletions(-) diff --git a/lib/Compiler.js b/lib/Compiler.js index f205cfb30..bc54f681b 100644 --- a/lib/Compiler.js +++ b/lib/Compiler.js @@ -28,7 +28,7 @@ class Compiler extends Tapable { super(); this.hooks = { shouldEmit: new SyncBailHook(["compilation"]), - done: new SyncHook(["stats"]), + done: new AsyncSeriesHook(["stats"]), additionalPass: new AsyncSeriesHook([]), beforeRun: new AsyncSeriesHook(["compilation"]), run: new AsyncSeriesHook(["compilation"]), @@ -171,8 +171,11 @@ class Compiler extends Tapable { const stats = new Stats(compilation); stats.startTime = startTime; stats.endTime = Date.now(); - this.hooks.done.call(stats); - return callback(null, stats); + this.hooks.done.callAsync(stats, err => { + if(err) return callback(err); + return callback(null, stats); + }); + return; } this.emitAssets(compilation, err => { @@ -184,11 +187,13 @@ class Compiler extends Tapable { const stats = new Stats(compilation); stats.startTime = startTime; stats.endTime = Date.now(); - this.hooks.done.call(stats); - - this.hooks.additionalPass.callAsync(err => { + this.hooks.done.callAsync(stats, err => { if(err) return callback(err); - this.compile(onCompiled); + + this.hooks.additionalPass.callAsync(err => { + if(err) return callback(err); + this.compile(onCompiled); + }); }); return; } @@ -199,8 +204,10 @@ class Compiler extends Tapable { const stats = new Stats(compilation); stats.startTime = startTime; stats.endTime = Date.now(); - this.hooks.done.call(stats); - return callback(null, stats); + this.hooks.done.callAsync(stats, err => { + if(err) return callback(err); + return callback(null, stats); + }); }); }); }; diff --git a/lib/Watching.js b/lib/Watching.js index 28268c445..38ca67fbf 100644 --- a/lib/Watching.js +++ b/lib/Watching.js @@ -59,11 +59,13 @@ class Watching { const stats = new Stats(compilation); stats.startTime = this.startTime; stats.endTime = Date.now(); - this.compiler.hooks.done.call(stats); - - this.compiler.hooks.additionalPass.callAsync(err => { + this.compiler.hooks.done.callAsync(stats, err => { if(err) return this._done(err); - this.compiler.compile(onCompiled); + + this.compiler.hooks.additionalPass.callAsync(err => { + if(err) return this._done(err); + this.compiler.compile(onCompiled); + }); }); return; } @@ -93,13 +95,14 @@ class Watching { return; } - this.compiler.hooks.done.call(stats); - this.handler(null, stats); - if(!this.closed) { - this.watch(Array.from(compilation.fileDependencies), Array.from(compilation.contextDependencies), Array.from(compilation.missingDependencies)); - } - for(const cb of this.callbacks) cb(); - this.callbacks.length = 0; + this.compiler.hooks.done.callAsync(stats, () => { + this.handler(null, stats); + if(!this.closed) { + this.watch(Array.from(compilation.fileDependencies), Array.from(compilation.contextDependencies), Array.from(compilation.missingDependencies)); + } + for(const cb of this.callbacks) cb(); + this.callbacks.length = 0; + }); } watch(files, dirs, missing) { From 0dd1727d66491ae10e0aa7a1ac1fdc5c80770aaf Mon Sep 17 00:00:00 2001 From: Christopher Beam Date: Fri, 26 Jan 2018 16:00:12 -0500 Subject: [PATCH 009/112] change polymer loader link current polymer loader link is unmaintained, switch to maintained loader --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 86557d55f..2db442915 100644 --- a/README.md +++ b/README.md @@ -217,14 +217,14 @@ or are automatically applied via regex from your webpack configuration. |Name|Status|Description| |:--:|:----:|:----------| ||![vue-npm]|Loads and compiles Vue Components| -||![polymer-npm]|Process HTML & CSS with preprocessor of choice and `require()` Web Components like first-class modules| +||![polymer-npm]|Process HTML & CSS with preprocessor of choice and `require()` Web Components like first-class modules| ||![angular-npm]| Loads and compiles Angular 2 Components| ||![riot-npm]| Riot official webpack loader| [vue-npm]: https://img.shields.io/npm/v/vue-loader.svg -[polymer-npm]: https://img.shields.io/npm/v/polymer-loader.svg +[polymer-npm]: https://img.shields.io/npm/v/polymer-webpack-loader.svg [angular-npm]: https://img.shields.io/npm/v/angular2-template-loader.svg [riot-npm]: https://img.shields.io/npm/v/riot-tag-loader.svg From 2a46d098d2486b97a2e85817bfda15ac11d829e5 Mon Sep 17 00:00:00 2001 From: Sean Larkin Date: Fri, 26 Jan 2018 16:06:24 -0800 Subject: [PATCH 010/112] Wrap default entry property in array This makes webpack-serve happier. --- lib/WebpackOptionsDefaulter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/WebpackOptionsDefaulter.js b/lib/WebpackOptionsDefaulter.js index 431631189..51dfc30bb 100644 --- a/lib/WebpackOptionsDefaulter.js +++ b/lib/WebpackOptionsDefaulter.js @@ -17,7 +17,7 @@ class WebpackOptionsDefaulter extends OptionsDefaulter { constructor() { super(); - this.set("entry", "./src"); + this.set("entry", ["./src"]); this.set("devtool", "make", options => (options.mode === "development" ? "eval" : false)); this.set("cache", "make", options => options.mode === "development"); From c26c872bb2f7e963ad7791a2056f97b235c52fa8 Mon Sep 17 00:00:00 2001 From: Ben Rothman Date: Thu, 25 Jan 2018 11:52:36 -0600 Subject: [PATCH 011/112] add "single" option to RuntimeChunkPlugin --- lib/WebpackOptionsApply.js | 2 +- lib/optimize/RuntimeChunkPlugin.js | 8 ++++++-- schemas/WebpackOptions.json | 11 +++++++++- test/statsCases/runtime-chunk-single/e1.js | 1 + test/statsCases/runtime-chunk-single/e2.js | 1 + .../runtime-chunk-single/expected.txt | 2 ++ .../runtime-chunk-single/webpack.config.js | 20 +++++++++++++++++++ test/statsCases/runtime-chunk/e1.js | 1 + test/statsCases/runtime-chunk/e2.js | 1 + test/statsCases/runtime-chunk/expected.txt | 2 ++ .../runtime-chunk/webpack.config.js | 20 +++++++++++++++++++ 11 files changed, 65 insertions(+), 4 deletions(-) create mode 100644 test/statsCases/runtime-chunk-single/e1.js create mode 100644 test/statsCases/runtime-chunk-single/e2.js create mode 100644 test/statsCases/runtime-chunk-single/expected.txt create mode 100644 test/statsCases/runtime-chunk-single/webpack.config.js create mode 100644 test/statsCases/runtime-chunk/e1.js create mode 100644 test/statsCases/runtime-chunk/e2.js create mode 100644 test/statsCases/runtime-chunk/expected.txt create mode 100644 test/statsCases/runtime-chunk/webpack.config.js diff --git a/lib/WebpackOptionsApply.js b/lib/WebpackOptionsApply.js index 617911ebd..a24a91ac9 100644 --- a/lib/WebpackOptionsApply.js +++ b/lib/WebpackOptionsApply.js @@ -291,7 +291,7 @@ class WebpackOptionsApply extends OptionsApply { if(options.optimization.splitChunks) new SplitChunksPlugin(options.optimization.splitChunks).apply(compiler); if(options.optimization.runtimeChunk) - new RuntimeChunkPlugin().apply(compiler); + new RuntimeChunkPlugin(options.optimization.runtimeChunk).apply(compiler); if(options.optimization.noEmitOnErrors) new NoEmitOnErrorsPlugin().apply(compiler); if(options.optimization.namedModules) diff --git a/lib/optimize/RuntimeChunkPlugin.js b/lib/optimize/RuntimeChunkPlugin.js index a004d07fb..5823d5b64 100644 --- a/lib/optimize/RuntimeChunkPlugin.js +++ b/lib/optimize/RuntimeChunkPlugin.js @@ -5,15 +5,19 @@ "use strict"; module.exports = class RuntimeChunkPlugin { - constructor(options) {} + constructor(options) { + this.single = options === "single"; + } apply(compiler) { compiler.hooks.thisCompilation.tap("RuntimeChunkPlugin", compilation => { compilation.hooks.optimizeChunksAdvanced.tap("RuntimeChunkPlugin", () => { + const singleRuntimeChunk = this.single ? compilation.addChunk("runtime") : undefined; + for(const entrypoint of compilation.entrypoints.values()) { const chunk = entrypoint.getRuntimeChunk(); if(chunk.getNumberOfModules() > 0) { - const newChunk = compilation.addChunk(entrypoint.name + "-runtime"); + const newChunk = this.single ? singleRuntimeChunk : compilation.addChunk(entrypoint.name + "-runtime"); entrypoint.unshiftChunk(newChunk); newChunk.addGroup(entrypoint); entrypoint.setRuntimeChunk(newChunk); diff --git a/schemas/WebpackOptions.json b/schemas/WebpackOptions.json index 93f843125..76a198366 100644 --- a/schemas/WebpackOptions.json +++ b/schemas/WebpackOptions.json @@ -1484,7 +1484,16 @@ }, "runtimeChunk": { "description": "Create an additional chunk which contains only the webpack runtime and chunk hash maps", - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "enum": [ + "single" + ] + } + ] }, "noEmitOnErrors": { "description": "Avoid emitting assets when errors occur", diff --git a/test/statsCases/runtime-chunk-single/e1.js b/test/statsCases/runtime-chunk-single/e1.js new file mode 100644 index 000000000..d8e371ad4 --- /dev/null +++ b/test/statsCases/runtime-chunk-single/e1.js @@ -0,0 +1 @@ +module.exports = "entry1"; diff --git a/test/statsCases/runtime-chunk-single/e2.js b/test/statsCases/runtime-chunk-single/e2.js new file mode 100644 index 000000000..a5a3b0d88 --- /dev/null +++ b/test/statsCases/runtime-chunk-single/e2.js @@ -0,0 +1 @@ +module.exports = "entry2"; diff --git a/test/statsCases/runtime-chunk-single/expected.txt b/test/statsCases/runtime-chunk-single/expected.txt new file mode 100644 index 000000000..77f5b8296 --- /dev/null +++ b/test/statsCases/runtime-chunk-single/expected.txt @@ -0,0 +1,2 @@ +Entrypoint e1 = runtime.js e1.js +Entrypoint e2 = runtime.js e2.js \ No newline at end of file diff --git a/test/statsCases/runtime-chunk-single/webpack.config.js b/test/statsCases/runtime-chunk-single/webpack.config.js new file mode 100644 index 000000000..9fd5dccf3 --- /dev/null +++ b/test/statsCases/runtime-chunk-single/webpack.config.js @@ -0,0 +1,20 @@ +module.exports = { + mode: "development", + entry: { + e1: "./e1", + e2: "./e2" + }, + output: { + filename: "[name].js" + }, + stats: { + hash: false, + timings: false, + assets: false, + modules: false, + reasons: true + }, + optimization: { + runtimeChunk: "single" + } +}; diff --git a/test/statsCases/runtime-chunk/e1.js b/test/statsCases/runtime-chunk/e1.js new file mode 100644 index 000000000..d8e371ad4 --- /dev/null +++ b/test/statsCases/runtime-chunk/e1.js @@ -0,0 +1 @@ +module.exports = "entry1"; diff --git a/test/statsCases/runtime-chunk/e2.js b/test/statsCases/runtime-chunk/e2.js new file mode 100644 index 000000000..a5a3b0d88 --- /dev/null +++ b/test/statsCases/runtime-chunk/e2.js @@ -0,0 +1 @@ +module.exports = "entry2"; diff --git a/test/statsCases/runtime-chunk/expected.txt b/test/statsCases/runtime-chunk/expected.txt new file mode 100644 index 000000000..021eea1a4 --- /dev/null +++ b/test/statsCases/runtime-chunk/expected.txt @@ -0,0 +1,2 @@ +Entrypoint e1 = e1-runtime.js e1.js +Entrypoint e2 = e2-runtime.js e2.js \ No newline at end of file diff --git a/test/statsCases/runtime-chunk/webpack.config.js b/test/statsCases/runtime-chunk/webpack.config.js new file mode 100644 index 000000000..05f67abda --- /dev/null +++ b/test/statsCases/runtime-chunk/webpack.config.js @@ -0,0 +1,20 @@ +module.exports = { + mode: "development", + entry: { + e1: "./e1", + e2: "./e2" + }, + output: { + filename: "[name].js" + }, + stats: { + hash: false, + timings: false, + assets: false, + modules: false, + reasons: false + }, + optimization: { + runtimeChunk: true + } +}; From e4375f8833eeb39391f868ca9b0409d69d71b768 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Sat, 27 Jan 2018 22:05:15 +0100 Subject: [PATCH 012/112] =?UTF-8?q?Avoid=20relying=20on=20Node=E2=80=99s?= =?UTF-8?q?=20internals?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `process.binding()` is not a public API, and should not be used. Luckily, Node recently introduced an API that does exactly what Webpack needs: https://nodejs.org/api/modules.html#modules_module_builtinmodules So use that instead and keep the old path as a fallback. --- lib/node/NodeTargetPlugin.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/node/NodeTargetPlugin.js b/lib/node/NodeTargetPlugin.js index 28ed5db83..ac2f05a55 100644 --- a/lib/node/NodeTargetPlugin.js +++ b/lib/node/NodeTargetPlugin.js @@ -6,9 +6,11 @@ const ExternalsPlugin = require("../ExternalsPlugin"); +const builtins = require("module").builtinModules || Object.keys(process.binding("natives")); + class NodeTargetPlugin { apply(compiler) { - new ExternalsPlugin("commonjs", Object.keys(process.binding("natives"))).apply(compiler); + new ExternalsPlugin("commonjs", builtins).apply(compiler); } } From 2aebfbe48ca1de63a16b82cda8182e5f47955870 Mon Sep 17 00:00:00 2001 From: Olivier Combe Date: Mon, 29 Jan 2018 15:50:57 +0100 Subject: [PATCH 013/112] fix(ConcatenatedModule): don't throw on arrays with empty values Fixes #6407 Fixes #5415 Ref https://github.com/angular/angular/issues/21809 --- lib/optimize/ConcatenatedModule.js | 1 + test/cases/scope-hoisting/issue-6407/import-one.js | 4 ++++ test/cases/scope-hoisting/issue-6407/import-two.js | 4 ++++ test/cases/scope-hoisting/issue-6407/index.js | 11 +++++++++++ 4 files changed, 20 insertions(+) create mode 100644 test/cases/scope-hoisting/issue-6407/import-one.js create mode 100644 test/cases/scope-hoisting/issue-6407/import-two.js create mode 100644 test/cases/scope-hoisting/issue-6407/index.js diff --git a/lib/optimize/ConcatenatedModule.js b/lib/optimize/ConcatenatedModule.js index 558aec96f..9789c1b72 100644 --- a/lib/optimize/ConcatenatedModule.js +++ b/lib/optimize/ConcatenatedModule.js @@ -143,6 +143,7 @@ function getPathInAst(ast, node) { } function enterNode(n) { + if(!n) return undefined; const r = n.range; if(r) { if(r[0] <= nr[0] && r[1] >= nr[1]) { diff --git a/test/cases/scope-hoisting/issue-6407/import-one.js b/test/cases/scope-hoisting/issue-6407/import-one.js new file mode 100644 index 000000000..4caae0537 --- /dev/null +++ b/test/cases/scope-hoisting/issue-6407/import-one.js @@ -0,0 +1,4 @@ +function foo(n) { + return 'bar'; +} +export default [, foo]; diff --git a/test/cases/scope-hoisting/issue-6407/import-two.js b/test/cases/scope-hoisting/issue-6407/import-two.js new file mode 100644 index 000000000..4caae0537 --- /dev/null +++ b/test/cases/scope-hoisting/issue-6407/import-two.js @@ -0,0 +1,4 @@ +function foo(n) { + return 'bar'; +} +export default [, foo]; diff --git a/test/cases/scope-hoisting/issue-6407/index.js b/test/cases/scope-hoisting/issue-6407/index.js new file mode 100644 index 000000000..193213228 --- /dev/null +++ b/test/cases/scope-hoisting/issue-6407/index.js @@ -0,0 +1,11 @@ +import importOne from './import-one'; +import importTwo from './import-two'; + +it("should concatenate modules default exports and empty array values", function() { + importOne.length.should.be.eql(2); + (typeof importOne[0]).should.be.eql('undefined'); + (typeof importOne[1]).should.be.eql('function'); + importTwo.length.should.be.eql(2); + (typeof importTwo[0]).should.be.eql('undefined'); + (typeof importTwo[1]).should.be.eql('function'); +}); From 795a8ed4b239e824c2ad1d64b3d236e5c7c1b5b2 Mon Sep 17 00:00:00 2001 From: Kunall Banerjee Date: Sat, 3 Jun 2017 17:40:21 -0400 Subject: [PATCH 014/112] Add built at time to webpack output --- lib/Stats.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/Stats.js b/lib/Stats.js index 0556b19e5..6f918d402 100644 --- a/lib/Stats.js +++ b/lib/Stats.js @@ -252,6 +252,7 @@ class Stats { if(showHash) obj.hash = this.hash; if(showTimings && this.startTime && this.endTime) { obj.time = this.endTime - this.startTime; + obj.builtAt = this.endTime; } if(showEnv && options._env) { @@ -611,6 +612,9 @@ class Stats { newline(); } if(typeof obj.time === "number") { + colors.normal("Built at: "); + colors.bold(new Date(obj.builtAt)); + newline(); colors.normal("Time: "); colors.bold(obj.time); colors.normal("ms"); From 09f959c68468f58b35e1745c8ac9493ac7a8205b Mon Sep 17 00:00:00 2001 From: Leon Weidauer Date: Wed, 19 Jul 2017 00:01:34 +0200 Subject: [PATCH 015/112] Fix Stats and BinTestCases after adding "Built at" In order to pass the tests, a similar test replacement as with the millisecond values needs to happen. For the "Built at" stat all dates are replaces with Thu Jan 01 1970 00:00:00 GMT. Related to issue #5305 --- lib/Stats.js | 11 ++++++++--- test/StatsTestCases.test.js | 6 ++++-- .../aggressive-splitting-entry/expected.txt | 2 ++ .../aggressive-splitting-on-demand/expected.txt | 1 + test/statsCases/chunks-development/expected.txt | 1 + test/statsCases/chunks/expected.txt | 1 + test/statsCases/color-disabled/expected.txt | 1 + test/statsCases/color-enabled-custom/expected.txt | 1 + test/statsCases/color-enabled/expected.txt | 1 + .../commons-chunk-min-size-0/expected.txt | 1 + .../commons-chunk-min-size-Infinity/expected.txt | 1 + .../commons-plugin-issue-4980/expected.txt | 2 ++ test/statsCases/define-plugin/expected.txt | 2 ++ test/statsCases/exclude-with-loader/expected.txt | 1 + test/statsCases/external/expected.txt | 1 + test/statsCases/filter-warnings/expected.txt | 13 +++++++++++++ test/statsCases/import-context-filter/expected.txt | 1 + test/statsCases/import-weak/expected.txt | 1 + .../limit-chunk-count-plugin/expected.txt | 4 ++++ test/statsCases/max-modules-default/expected.txt | 1 + test/statsCases/max-modules/expected.txt | 1 + .../module-trace-disabled-in-error/expected.txt | 1 + .../module-trace-enabled-in-error/expected.txt | 1 + .../named-chunks-plugin-async/expected.txt | 1 + test/statsCases/named-chunks-plugin/expected.txt | 1 + .../expected.txt | 1 + test/statsCases/optimize-chunks/expected.txt | 1 + test/statsCases/performance-disabled/expected.txt | 1 + test/statsCases/performance-error/expected.txt | 1 + .../performance-no-async-chunks-shown/expected.txt | 1 + test/statsCases/performance-no-hints/expected.txt | 1 + .../performance-oversize-limit-error/expected.txt | 1 + test/statsCases/preset-detailed/expected.txt | 1 + .../expected.txt | 1 + .../preset-normal-performance/expected.txt | 1 + test/statsCases/preset-normal/expected.txt | 1 + test/statsCases/preset-verbose/expected.txt | 1 + test/statsCases/resolve-plugin-context/expected.txt | 1 + test/statsCases/reverse-sort-modules/expected.txt | 1 + .../statsCases/scope-hoisting-bailouts/expected.txt | 1 + test/statsCases/scope-hoisting-multi/expected.txt | 2 ++ test/statsCases/simple-more-info/expected.txt | 1 + test/statsCases/simple/expected.txt | 1 + test/statsCases/tree-shaking/expected.txt | 1 + test/statsCases/warnings-uglifyjs/expected.txt | 1 + 45 files changed, 74 insertions(+), 5 deletions(-) diff --git a/lib/Stats.js b/lib/Stats.js index 6f918d402..30b5f8df6 100644 --- a/lib/Stats.js +++ b/lib/Stats.js @@ -612,9 +612,6 @@ class Stats { newline(); } if(typeof obj.time === "number") { - colors.normal("Built at: "); - colors.bold(new Date(obj.builtAt)); - newline(); colors.normal("Time: "); colors.bold(obj.time); colors.normal("ms"); @@ -623,6 +620,14 @@ class Stats { if(obj.env) { colors.normal("Environment (--env): "); colors.bold(JSON.stringify(obj.env, null, 2)); + newline() + } + if(typeof obj.builtAt === "number") { + const now = (new Date()).toString().split(" "); + colors.normal("Built at: "); + colors.normal(`${now[0]} ${now[1]} ${now[2]} ${now[3]} `); + colors.bold(now[4]); + colors.normal(now[6] ? ` ${now[5]} ${now[6]}` : ` ${now[5]}`); newline(); } if(obj.publicPath) { diff --git a/test/StatsTestCases.test.js b/test/StatsTestCases.test.js index 35dd4e1ca..21ca60dd9 100644 --- a/test/StatsTestCases.test.js +++ b/test/StatsTestCases.test.js @@ -88,14 +88,16 @@ describe("StatsTestCases", () => { if(!hasColorSetting) { actual = actual .replace(/\u001b\[[0-9;]*m/g, "") - .replace(/[0-9]+(\s?ms)/g, "X$1"); + .replace(/[0-9]+(\s?ms)/g, "X$1") + .replace(/^(\s*Built at:) (.*)$/gm, "$1 Thu Jan 01 1970 00:00:00 GMT"); } else { actual = actual .replace(/\u001b\[1m\u001b\[([0-9;]*)m/g, "") .replace(/\u001b\[1m/g, "") .replace(/\u001b\[39m\u001b\[22m/g, "") .replace(/\u001b\[([0-9;]*)m/g, "") - .replace(/[0-9]+(<\/CLR>)?(\s?ms)/g, "X$1$2"); + .replace(/[0-9]+(<\/CLR>)?(\s?ms)/g, "X$1$2") + .replace(/^(\s*Built at:) (.*)$/gm, "$1 Thu Jan 01 1970 00:00:00<\/CLR> GMT"); } actual = actual diff --git a/test/statsCases/aggressive-splitting-entry/expected.txt b/test/statsCases/aggressive-splitting-entry/expected.txt index 94e20c07d..f11f0b979 100644 --- a/test/statsCases/aggressive-splitting-entry/expected.txt +++ b/test/statsCases/aggressive-splitting-entry/expected.txt @@ -2,6 +2,7 @@ Hash: 1d3bfcee111df03fa6251d3bfcee111df03fa625 Child fitting: Hash: 1d3bfcee111df03fa625 Time: Xms + Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names 706f97eb6a2b8fb1a17e.js 1.05 KiB 0 [emitted] a65f8652fd07c12d0049.js 9.92 KiB 1 [emitted] @@ -27,6 +28,7 @@ Child fitting: Child content-change: Hash: 1d3bfcee111df03fa625 Time: Xms + Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names 706f97eb6a2b8fb1a17e.js 1.05 KiB 0 [emitted] a65f8652fd07c12d0049.js 9.92 KiB 1 [emitted] diff --git a/test/statsCases/aggressive-splitting-on-demand/expected.txt b/test/statsCases/aggressive-splitting-on-demand/expected.txt index abe1b68d3..303da3802 100644 --- a/test/statsCases/aggressive-splitting-on-demand/expected.txt +++ b/test/statsCases/aggressive-splitting-on-demand/expected.txt @@ -1,5 +1,6 @@ Hash: af168fd06ab994207f62 Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names 031881c6ced2f576ff79.js 1.94 KiB 5 [emitted] ba1a8dd27d611254d495.js 1.93 KiB 0 [emitted] diff --git a/test/statsCases/chunks-development/expected.txt b/test/statsCases/chunks-development/expected.txt index 2513298b5..1ecbd13bb 100644 --- a/test/statsCases/chunks-development/expected.txt +++ b/test/statsCases/chunks-development/expected.txt @@ -1,5 +1,6 @@ Hash: 5ce1f032cffdff8368b5 Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names 0.bundle.js 530 bytes 0 [emitted] 1.bundle.js 394 bytes 1 [emitted] diff --git a/test/statsCases/chunks/expected.txt b/test/statsCases/chunks/expected.txt index d84662f29..0f438ee56 100644 --- a/test/statsCases/chunks/expected.txt +++ b/test/statsCases/chunks/expected.txt @@ -1,5 +1,6 @@ Hash: 7870601bc1a1a4f9c4c1 Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names 0.bundle.js 152 bytes 0 [emitted] 1.bundle.js 289 bytes 1 [emitted] diff --git a/test/statsCases/color-disabled/expected.txt b/test/statsCases/color-disabled/expected.txt index caeb85c5c..2351c1b6e 100644 --- a/test/statsCases/color-disabled/expected.txt +++ b/test/statsCases/color-disabled/expected.txt @@ -1,5 +1,6 @@ Hash: 5ebdffcace96139575ac Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names main.js 2.61 KiB 0 [emitted] main Entrypoint main = main.js diff --git a/test/statsCases/color-enabled-custom/expected.txt b/test/statsCases/color-enabled-custom/expected.txt index 51a7a2e6c..0f8ac7758 100644 --- a/test/statsCases/color-enabled-custom/expected.txt +++ b/test/statsCases/color-enabled-custom/expected.txt @@ -1,5 +1,6 @@ Hash: 5ebdffcace96139575ac Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names main.js 2.61 KiB 0 [emitted] main Entrypoint main = main.js diff --git a/test/statsCases/color-enabled/expected.txt b/test/statsCases/color-enabled/expected.txt index 483a4ca98..cff1a8a5f 100644 --- a/test/statsCases/color-enabled/expected.txt +++ b/test/statsCases/color-enabled/expected.txt @@ -1,5 +1,6 @@ Hash: 5ebdffcace96139575ac Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names main.js 2.61 KiB 0 [emitted] main Entrypoint main = main.js diff --git a/test/statsCases/commons-chunk-min-size-0/expected.txt b/test/statsCases/commons-chunk-min-size-0/expected.txt index 4fb49f232..a75756eaa 100644 --- a/test/statsCases/commons-chunk-min-size-0/expected.txt +++ b/test/statsCases/commons-chunk-min-size-0/expected.txt @@ -1,5 +1,6 @@ Hash: 2a374ac6d98475951384 Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names entry-1.js 5.49 KiB 0 [emitted] entry-1 vendor-1~entry-1.js 314 bytes 1 [emitted] vendor-1~entry-1 diff --git a/test/statsCases/commons-chunk-min-size-Infinity/expected.txt b/test/statsCases/commons-chunk-min-size-Infinity/expected.txt index 4126cd96f..01d57b0e0 100644 --- a/test/statsCases/commons-chunk-min-size-Infinity/expected.txt +++ b/test/statsCases/commons-chunk-min-size-Infinity/expected.txt @@ -1,5 +1,6 @@ Hash: d86d9e4d7a615c762442 Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names entry-1.js 5.49 KiB 0 [emitted] entry-1 vendor-1.js 314 bytes 1 [emitted] vendor-1 diff --git a/test/statsCases/commons-plugin-issue-4980/expected.txt b/test/statsCases/commons-plugin-issue-4980/expected.txt index 1fc3b2498..2b0c41ec4 100644 --- a/test/statsCases/commons-plugin-issue-4980/expected.txt +++ b/test/statsCases/commons-plugin-issue-4980/expected.txt @@ -2,6 +2,7 @@ Hash: cdd753ac70c5ff3b74bedd7e476c27a1777b4d27 Child Hash: cdd753ac70c5ff3b74be Time: Xms + Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names app.js 5.58 KiB 0 [emitted] app vendor.a86979cc789cd5f9d78f.js 619 bytes 1 [emitted] vendor @@ -14,6 +15,7 @@ Child Child Hash: dd7e476c27a1777b4d27 Time: Xms + Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names app.js 5.6 KiB 0 [emitted] app vendor.a86979cc789cd5f9d78f.js 619 bytes 1 [emitted] vendor diff --git a/test/statsCases/define-plugin/expected.txt b/test/statsCases/define-plugin/expected.txt index 9f37c44bb..5e6ce8d03 100644 --- a/test/statsCases/define-plugin/expected.txt +++ b/test/statsCases/define-plugin/expected.txt @@ -2,6 +2,7 @@ Hash: 40b9288c7b06181fe56c92fc98986ee18223c384 Child Hash: 40b9288c7b06181fe56c Time: Xms + Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names main.js 2.63 KiB 0 [emitted] main Entrypoint main = main.js @@ -9,6 +10,7 @@ Child Child Hash: 92fc98986ee18223c384 Time: Xms + Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names main.js 2.63 KiB 0 [emitted] main Entrypoint main = main.js diff --git a/test/statsCases/exclude-with-loader/expected.txt b/test/statsCases/exclude-with-loader/expected.txt index 00f70c2b1..6a1fa77a8 100644 --- a/test/statsCases/exclude-with-loader/expected.txt +++ b/test/statsCases/exclude-with-loader/expected.txt @@ -1,5 +1,6 @@ Hash: 8ba560cc1610e1d6a812 Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names bundle.js 3.05 KiB 0 [emitted] main + 1 hidden asset diff --git a/test/statsCases/external/expected.txt b/test/statsCases/external/expected.txt index b7538a4e2..44e5b822d 100644 --- a/test/statsCases/external/expected.txt +++ b/test/statsCases/external/expected.txt @@ -1,5 +1,6 @@ Hash: bceb26d8b2be7c67df1d Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names main.js 2.74 KiB 0 [emitted] main Entrypoint main = main.js diff --git a/test/statsCases/filter-warnings/expected.txt b/test/statsCases/filter-warnings/expected.txt index 1e805e86e..8a3ccbb49 100644 --- a/test/statsCases/filter-warnings/expected.txt +++ b/test/statsCases/filter-warnings/expected.txt @@ -2,6 +2,7 @@ Hash: 29c7e69ca39c982193b929c7e69ca39c982193b929c7e69ca39c982193b929c7e69ca39c98 Child Hash: 29c7e69ca39c982193b9 Time: Xms + Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names bundle.js 2.19 KiB 0 [emitted] main Entrypoint main = bundle.js @@ -21,42 +22,49 @@ Child Child Hash: 29c7e69ca39c982193b9 Time: Xms + Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names bundle.js 2.19 KiB 0 [emitted] main Entrypoint main = bundle.js Child Hash: 29c7e69ca39c982193b9 Time: Xms + Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names bundle.js 2.19 KiB 0 [emitted] main Entrypoint main = bundle.js Child Hash: 29c7e69ca39c982193b9 Time: Xms + Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names bundle.js 2.19 KiB 0 [emitted] main Entrypoint main = bundle.js Child Hash: 29c7e69ca39c982193b9 Time: Xms + Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names bundle.js 2.19 KiB 0 [emitted] main Entrypoint main = bundle.js Child Hash: 29c7e69ca39c982193b9 Time: Xms + Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names bundle.js 2.19 KiB 0 [emitted] main Entrypoint main = bundle.js Child Hash: 29c7e69ca39c982193b9 Time: Xms + Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names bundle.js 2.19 KiB 0 [emitted] main Entrypoint main = bundle.js Child Hash: 29c7e69ca39c982193b9 Time: Xms + Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names bundle.js 2.19 KiB 0 [emitted] main Entrypoint main = bundle.js @@ -76,6 +84,7 @@ Child Child Hash: 29c7e69ca39c982193b9 Time: Xms + Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names bundle.js 2.19 KiB 0 [emitted] main Entrypoint main = bundle.js @@ -95,6 +104,7 @@ Child Child Hash: 29c7e69ca39c982193b9 Time: Xms + Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names bundle.js 2.19 KiB 0 [emitted] main Entrypoint main = bundle.js @@ -114,6 +124,7 @@ Child Child Hash: 29c7e69ca39c982193b9 Time: Xms + Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names bundle.js 2.19 KiB 0 [emitted] main Entrypoint main = bundle.js @@ -133,6 +144,7 @@ Child Child Hash: 29c7e69ca39c982193b9 Time: Xms + Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names bundle.js 2.19 KiB 0 [emitted] main Entrypoint main = bundle.js @@ -152,6 +164,7 @@ Child Child Hash: 29c7e69ca39c982193b9 Time: Xms + Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names bundle.js 2.19 KiB 0 [emitted] main Entrypoint main = bundle.js diff --git a/test/statsCases/import-context-filter/expected.txt b/test/statsCases/import-context-filter/expected.txt index 2e6bc18da..0409ac977 100644 --- a/test/statsCases/import-context-filter/expected.txt +++ b/test/statsCases/import-context-filter/expected.txt @@ -1,5 +1,6 @@ Hash: 3812be209526ddc2730f Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names 0.js 305 bytes 0 [emitted] 1.js 314 bytes 1 [emitted] diff --git a/test/statsCases/import-weak/expected.txt b/test/statsCases/import-weak/expected.txt index 0f5b94f17..330c3a009 100644 --- a/test/statsCases/import-weak/expected.txt +++ b/test/statsCases/import-weak/expected.txt @@ -1,5 +1,6 @@ Hash: a9db7f3b329c4330e089 Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names 0.js 149 bytes 0 [emitted] entry.js 7.63 KiB 1 [emitted] entry diff --git a/test/statsCases/limit-chunk-count-plugin/expected.txt b/test/statsCases/limit-chunk-count-plugin/expected.txt index f6fb9afc9..8c4fe669f 100644 --- a/test/statsCases/limit-chunk-count-plugin/expected.txt +++ b/test/statsCases/limit-chunk-count-plugin/expected.txt @@ -2,6 +2,7 @@ Hash: 1c28a2310b8d6ad1d2eae9e095881f37f449e557b0dba9af2a29d62e7d950cfed055ea39ea Child 1 chunks: Hash: 1c28a2310b8d6ad1d2ea Time: Xms + Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names bundle.js 5.52 KiB 0 [emitted] main Entrypoint main = bundle.js @@ -15,6 +16,7 @@ Child 1 chunks: Child 2 chunks: Hash: e9e095881f37f449e557 Time: Xms + Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names 0.bundle.js 912 bytes 0 [emitted] bundle.js 7.14 KiB 1 [emitted] main @@ -30,6 +32,7 @@ Child 2 chunks: Child 3 chunks: Hash: b0dba9af2a29d62e7d95 Time: Xms + Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names 0.bundle.js 774 bytes 0 [emitted] 1.bundle.js 245 bytes 1 [emitted] @@ -47,6 +50,7 @@ Child 3 chunks: Child 4 chunks: Hash: 0cfed055ea39eaf47f56 Time: Xms + Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names 0.bundle.js 236 bytes 0 [emitted] 1.bundle.js 245 bytes 1 [emitted] diff --git a/test/statsCases/max-modules-default/expected.txt b/test/statsCases/max-modules-default/expected.txt index c2ba05757..8f9eb8e47 100644 --- a/test/statsCases/max-modules-default/expected.txt +++ b/test/statsCases/max-modules-default/expected.txt @@ -1,5 +1,6 @@ Hash: 0fd8ab10acd7dd67da45 Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names main.js 5.85 KiB 0 [emitted] main Entrypoint main = main.js diff --git a/test/statsCases/max-modules/expected.txt b/test/statsCases/max-modules/expected.txt index a0a27ddf4..ff575da13 100644 --- a/test/statsCases/max-modules/expected.txt +++ b/test/statsCases/max-modules/expected.txt @@ -1,5 +1,6 @@ Hash: 0fd8ab10acd7dd67da45 Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names main.js 5.85 KiB 0 [emitted] main Entrypoint main = main.js diff --git a/test/statsCases/module-trace-disabled-in-error/expected.txt b/test/statsCases/module-trace-disabled-in-error/expected.txt index 97007ebf9..103e60f89 100644 --- a/test/statsCases/module-trace-disabled-in-error/expected.txt +++ b/test/statsCases/module-trace-disabled-in-error/expected.txt @@ -1,4 +1,5 @@ Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names main.js 2.79 KiB 0 main Entrypoint main = main.js diff --git a/test/statsCases/module-trace-enabled-in-error/expected.txt b/test/statsCases/module-trace-enabled-in-error/expected.txt index ee5409f2d..d76fcbffa 100644 --- a/test/statsCases/module-trace-enabled-in-error/expected.txt +++ b/test/statsCases/module-trace-enabled-in-error/expected.txt @@ -1,4 +1,5 @@ Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names main.js 2.79 KiB 0 main Entrypoint main = main.js diff --git a/test/statsCases/named-chunks-plugin-async/expected.txt b/test/statsCases/named-chunks-plugin-async/expected.txt index d2b497c4e..dccda5b41 100644 --- a/test/statsCases/named-chunks-plugin-async/expected.txt +++ b/test/statsCases/named-chunks-plugin-async/expected.txt @@ -1,5 +1,6 @@ Hash: 16c09fc31f1686ee930a Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names chunk-containing-__a_js.js 453 bytes chunk-containing-__a_js [emitted] chunk-containing-__b_js.js 173 bytes chunk-containing-__b_js [emitted] diff --git a/test/statsCases/named-chunks-plugin/expected.txt b/test/statsCases/named-chunks-plugin/expected.txt index 73a7dc7a2..13e6502ba 100644 --- a/test/statsCases/named-chunks-plugin/expected.txt +++ b/test/statsCases/named-chunks-plugin/expected.txt @@ -1,5 +1,6 @@ Hash: 8b9265d1f4b67c8201f5 Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names entry.js 5.34 KiB entry [emitted] entry vendor.js 269 bytes vendor [emitted] vendor diff --git a/test/statsCases/no-emit-on-errors-plugin-with-child-error/expected.txt b/test/statsCases/no-emit-on-errors-plugin-with-child-error/expected.txt index 3dd6c184f..8e2e9d07c 100644 --- a/test/statsCases/no-emit-on-errors-plugin-with-child-error/expected.txt +++ b/test/statsCases/no-emit-on-errors-plugin-with-child-error/expected.txt @@ -1,5 +1,6 @@ Hash: 6f576d572dc2e6e75ac3 Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names child.js 2.61 KiB bundle.js 2.61 KiB 0 main diff --git a/test/statsCases/optimize-chunks/expected.txt b/test/statsCases/optimize-chunks/expected.txt index c1803d309..633576295 100644 --- a/test/statsCases/optimize-chunks/expected.txt +++ b/test/statsCases/optimize-chunks/expected.txt @@ -1,5 +1,6 @@ Hash: 6032753dfe117b1c3893 Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names cir1.js 299 bytes 0 [emitted] cir1 ab.js 183 bytes 1 [emitted] ab diff --git a/test/statsCases/performance-disabled/expected.txt b/test/statsCases/performance-disabled/expected.txt index 1488c0ef5..311838388 100644 --- a/test/statsCases/performance-disabled/expected.txt +++ b/test/statsCases/performance-disabled/expected.txt @@ -1,4 +1,5 @@ Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names 0.js 152 bytes 0 [emitted] 1.js 289 bytes 1 [emitted] diff --git a/test/statsCases/performance-error/expected.txt b/test/statsCases/performance-error/expected.txt index 74601b211..f9b67149c 100644 --- a/test/statsCases/performance-error/expected.txt +++ b/test/statsCases/performance-error/expected.txt @@ -1,4 +1,5 @@ Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names 0.js 152 bytes 0 [emitted] 1.js 289 bytes 1 [emitted] diff --git a/test/statsCases/performance-no-async-chunks-shown/expected.txt b/test/statsCases/performance-no-async-chunks-shown/expected.txt index 95639f3ba..1ec302a09 100644 --- a/test/statsCases/performance-no-async-chunks-shown/expected.txt +++ b/test/statsCases/performance-no-async-chunks-shown/expected.txt @@ -1,4 +1,5 @@ Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names main.js 296 KiB 0 [emitted] [big] main sec.js 2.95 KiB 1 [emitted] sec diff --git a/test/statsCases/performance-no-hints/expected.txt b/test/statsCases/performance-no-hints/expected.txt index 408aaf7a1..00f1efafc 100644 --- a/test/statsCases/performance-no-hints/expected.txt +++ b/test/statsCases/performance-no-hints/expected.txt @@ -1,4 +1,5 @@ Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names 0.js 152 bytes 0 [emitted] 1.js 289 bytes 1 [emitted] diff --git a/test/statsCases/performance-oversize-limit-error/expected.txt b/test/statsCases/performance-oversize-limit-error/expected.txt index fc0401887..23e8b18d7 100644 --- a/test/statsCases/performance-oversize-limit-error/expected.txt +++ b/test/statsCases/performance-oversize-limit-error/expected.txt @@ -1,4 +1,5 @@ Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names main.js 296 KiB 0 [emitted] [big] main sec.js 296 KiB 1 [emitted] [big] sec diff --git a/test/statsCases/preset-detailed/expected.txt b/test/statsCases/preset-detailed/expected.txt index 5d3433a90..a2576f9dd 100644 --- a/test/statsCases/preset-detailed/expected.txt +++ b/test/statsCases/preset-detailed/expected.txt @@ -1,5 +1,6 @@ Hash: d748792ec03ede1f69dc Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names 0.js 152 bytes 0 [emitted] 1.js 289 bytes 1 [emitted] diff --git a/test/statsCases/preset-normal-performance-ensure-filter-sourcemaps/expected.txt b/test/statsCases/preset-normal-performance-ensure-filter-sourcemaps/expected.txt index 1e88ec95c..dc0321e6a 100644 --- a/test/statsCases/preset-normal-performance-ensure-filter-sourcemaps/expected.txt +++ b/test/statsCases/preset-normal-performance-ensure-filter-sourcemaps/expected.txt @@ -1,4 +1,5 @@ Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names 0.js 182 bytes 0 [emitted] 1.js 319 bytes 1 [emitted] diff --git a/test/statsCases/preset-normal-performance/expected.txt b/test/statsCases/preset-normal-performance/expected.txt index 4b6661e61..2eb11a5e6 100644 --- a/test/statsCases/preset-normal-performance/expected.txt +++ b/test/statsCases/preset-normal-performance/expected.txt @@ -1,4 +1,5 @@ Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names 0.js 152 bytes 0 [emitted] 1.js 289 bytes 1 [emitted] diff --git a/test/statsCases/preset-normal/expected.txt b/test/statsCases/preset-normal/expected.txt index d5267e1ba..322ddb915 100644 --- a/test/statsCases/preset-normal/expected.txt +++ b/test/statsCases/preset-normal/expected.txt @@ -1,5 +1,6 @@ Hash: d748792ec03ede1f69dc Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names 0.js 152 bytes 0 [emitted] 1.js 289 bytes 1 [emitted] diff --git a/test/statsCases/preset-verbose/expected.txt b/test/statsCases/preset-verbose/expected.txt index 242d87043..e15daa8cd 100644 --- a/test/statsCases/preset-verbose/expected.txt +++ b/test/statsCases/preset-verbose/expected.txt @@ -1,5 +1,6 @@ Hash: d748792ec03ede1f69dc Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names 0.js 152 bytes 0 [emitted] 1.js 289 bytes 1 [emitted] diff --git a/test/statsCases/resolve-plugin-context/expected.txt b/test/statsCases/resolve-plugin-context/expected.txt index cd10ee295..183e14eeb 100644 --- a/test/statsCases/resolve-plugin-context/expected.txt +++ b/test/statsCases/resolve-plugin-context/expected.txt @@ -1,5 +1,6 @@ Hash: 20d34a938ae78cffd3f2 Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names bundle.js 3.01 KiB 0 [emitted] main Entrypoint main = bundle.js diff --git a/test/statsCases/reverse-sort-modules/expected.txt b/test/statsCases/reverse-sort-modules/expected.txt index bd1fe6fca..f2aeb6375 100644 --- a/test/statsCases/reverse-sort-modules/expected.txt +++ b/test/statsCases/reverse-sort-modules/expected.txt @@ -1,5 +1,6 @@ Hash: 0fd8ab10acd7dd67da45 Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names main.js 5.85 KiB 0 [emitted] main Entrypoint main = main.js diff --git a/test/statsCases/scope-hoisting-bailouts/expected.txt b/test/statsCases/scope-hoisting-bailouts/expected.txt index 1de266f94..bb6ecb35e 100644 --- a/test/statsCases/scope-hoisting-bailouts/expected.txt +++ b/test/statsCases/scope-hoisting-bailouts/expected.txt @@ -1,5 +1,6 @@ Hash: 8ea520d39e2a8caaf145 Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT Entrypoint index = index.js Entrypoint entry = entry.js [0] ./entry.js 32 bytes {0} {1} [built] diff --git a/test/statsCases/scope-hoisting-multi/expected.txt b/test/statsCases/scope-hoisting-multi/expected.txt index cb9084259..d7e2883f8 100644 --- a/test/statsCases/scope-hoisting-multi/expected.txt +++ b/test/statsCases/scope-hoisting-multi/expected.txt @@ -2,6 +2,7 @@ Hash: f987d10439866c1320274e05ad6ebdcc88f97d91 Child Hash: f987d10439866c132027 Time: Xms + Built at: Thu Jan 01 1970 00:00:00 GMT Entrypoint first = vendor.js first.js Entrypoint second = vendor.js second.js [0] ./common_lazy_shared.js 25 bytes {0} {1} {2} [built] @@ -18,6 +19,7 @@ Child Child Hash: 4e05ad6ebdcc88f97d91 Time: Xms + Built at: Thu Jan 01 1970 00:00:00 GMT Entrypoint first = vendor.js first.js Entrypoint second = vendor.js second.js [0] ./common_lazy_shared.js 25 bytes {0} {1} {2} [built] diff --git a/test/statsCases/simple-more-info/expected.txt b/test/statsCases/simple-more-info/expected.txt index bae1ea0d9..9c59b74cf 100644 --- a/test/statsCases/simple-more-info/expected.txt +++ b/test/statsCases/simple-more-info/expected.txt @@ -1,5 +1,6 @@ Hash: 1911bed74c47698d017f Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names bundle.js 2.61 KiB 0 [emitted] main Entrypoint main = bundle.js diff --git a/test/statsCases/simple/expected.txt b/test/statsCases/simple/expected.txt index 47c02ed13..7d74e52ad 100644 --- a/test/statsCases/simple/expected.txt +++ b/test/statsCases/simple/expected.txt @@ -1,5 +1,6 @@ Hash: f0bbd0723c33cf044c2f Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names bundle.js 2.89 KiB main [emitted] main Entrypoint main = bundle.js diff --git a/test/statsCases/tree-shaking/expected.txt b/test/statsCases/tree-shaking/expected.txt index 935245b65..5615b339f 100644 --- a/test/statsCases/tree-shaking/expected.txt +++ b/test/statsCases/tree-shaking/expected.txt @@ -1,5 +1,6 @@ Hash: 612f7baf263b811351ca Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names bundle.js 7.27 KiB 0 [emitted] main Entrypoint main = bundle.js diff --git a/test/statsCases/warnings-uglifyjs/expected.txt b/test/statsCases/warnings-uglifyjs/expected.txt index a0e19a9b2..5d82023e8 100644 --- a/test/statsCases/warnings-uglifyjs/expected.txt +++ b/test/statsCases/warnings-uglifyjs/expected.txt @@ -1,5 +1,6 @@ Hash: 646a540e1a95f55e1b8c Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names bundle.js 2.19 KiB 0 [emitted] main Entrypoint main = bundle.js From 56d22e99170a23c701b532cbef9390e0022cb844 Mon Sep 17 00:00:00 2001 From: Connor Clark Date: Sun, 28 Jan 2018 12:36:26 -0800 Subject: [PATCH 016/112] Use builtAt time instead of current time for stats logging --- lib/Stats.js | 8 -------- 1 file changed, 8 deletions(-) diff --git a/lib/Stats.js b/lib/Stats.js index 30b5f8df6..a192549bd 100644 --- a/lib/Stats.js +++ b/lib/Stats.js @@ -620,14 +620,6 @@ class Stats { if(obj.env) { colors.normal("Environment (--env): "); colors.bold(JSON.stringify(obj.env, null, 2)); - newline() - } - if(typeof obj.builtAt === "number") { - const now = (new Date()).toString().split(" "); - colors.normal("Built at: "); - colors.normal(`${now[0]} ${now[1]} ${now[2]} ${now[3]} `); - colors.bold(now[4]); - colors.normal(now[6] ? ` ${now[5]} ${now[6]}` : ` ${now[5]}`); newline(); } if(obj.publicPath) { From 7de55c8e8c0c64c1afafb1d05197a38156865659 Mon Sep 17 00:00:00 2001 From: Connor Clark Date: Sun, 28 Jan 2018 12:36:26 -0800 Subject: [PATCH 017/112] Use builtAt time instead of current time for stats logging --- lib/Stats.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/Stats.js b/lib/Stats.js index a192549bd..c0739de83 100644 --- a/lib/Stats.js +++ b/lib/Stats.js @@ -617,6 +617,14 @@ class Stats { colors.normal("ms"); newline(); } + if(typeof obj.builtAt === "number") { + const now = (new Date(obj.builtAt)).toString().split(" "); + colors.normal("Built at: "); + colors.normal(`${now[0]} ${now[1]} ${now[2]} ${now[3]} `); + colors.bold(now[4]); + colors.normal(now[6] ? ` ${now[5]} ${now[6]}` : ` ${now[5]}`); + newline(); + } if(obj.env) { colors.normal("Environment (--env): "); colors.bold(JSON.stringify(obj.env, null, 2)); From 5cc55d8912b3fb449159c8da9badb930ca321436 Mon Sep 17 00:00:00 2001 From: Kunall Banerjee Date: Sat, 3 Jun 2017 17:40:21 -0400 Subject: [PATCH 018/112] Add built at time to webpack output --- lib/Stats.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/Stats.js b/lib/Stats.js index c0739de83..2baa071d4 100644 --- a/lib/Stats.js +++ b/lib/Stats.js @@ -612,6 +612,9 @@ class Stats { newline(); } if(typeof obj.time === "number") { + colors.normal("Built at: "); + colors.bold(new Date(obj.builtAt)); + newline(); colors.normal("Time: "); colors.bold(obj.time); colors.normal("ms"); From 88cdf4b6af3a3a937004513f9dec5bd5e387adcd Mon Sep 17 00:00:00 2001 From: Sam Saccone Date: Mon, 29 Jan 2018 15:59:53 -0800 Subject: [PATCH 019/112] Manually exclude internal tap of plugin. This was forcing the timestamp of the last trace to be the last event in the JSON trace, and thus breaking the CPU profile. Instead manually exclude this plugin from being traced to avoid this issue. --- lib/debug/ProfilingPlugin.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/debug/ProfilingPlugin.js b/lib/debug/ProfilingPlugin.js index 375814f70..9aa027b2e 100644 --- a/lib/debug/ProfilingPlugin.js +++ b/lib/debug/ProfilingPlugin.js @@ -130,6 +130,8 @@ function createTrace(outPath) { }; } +const pluginName = "ProfilingPlugin"; + class ProfilingPlugin { // TODO: Add plugin schema validation here since there are options. constructor(opts) { @@ -150,7 +152,7 @@ class ProfilingPlugin { compiler.resolverFactory.hooks[hookName].intercept(makeInterceptorFor("Resolver", tracer)(hookName)); }); - compiler.hooks.compilation.tap("ProfilingPlugin", (compilation, { + compiler.hooks.compilation.tap(pluginName, (compilation, { normalModuleFactory, contextModuleFactory }) => { @@ -163,7 +165,7 @@ class ProfilingPlugin { // We need to write out the CPU profile when we are all done. compiler.hooks.done.tap({ - name: "ProfilingPlugin", + name: pluginName, stage: Infinity }, () => { tracer.profiler.stopProfiling().then((parsedResults) => { @@ -356,6 +358,12 @@ const makeNewProfiledTapFn = (hookName, tracer, { case "sync": return(...args) => { // eslint-disable-line const id = ++tracer.counter; + // Do not instrument outself due to the CPU + // profile needing to be the last event in the trace. + if(name === pluginName) { + return fn(...args); + } + tracer.trace.begin({ name, id, From 94db1bd21c182dac45b226c304639a70f3e9f3fc Mon Sep 17 00:00:00 2001 From: kingdaro Date: Mon, 29 Jan 2018 20:07:21 -0500 Subject: [PATCH 020/112] feat: add helpful error messages for removed plugins --- lib/webpack.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/lib/webpack.js b/lib/webpack.js index edeca329b..6ba1def02 100644 --- a/lib/webpack.js +++ b/lib/webpack.js @@ -132,3 +132,23 @@ exportPlugins(exports.node = {}, { exportPlugins(exports.debug = {}, { "ProfilingPlugin": () => require("./debug/ProfilingPlugin"), }); + +const defineMissingPluginError = (pluginName, errorMessage) => { + Reflect.defineProperty(exports.optimize, pluginName, { + configurable: false, + enumerable: true, + get() { + throw new Error(errorMessage); + } + }); +} + +defineMissingPluginError( + "UglifyJsPlugin", + "webpack.optimize.UglifyJsPlugin has been removed, please use config.optimization.minimize instead." +) + +defineMissingPluginError( + "CommonsChunkPlugin", + "webpack.optimize.CommonsChunkPlugin has been removed, please use config.optimization.splitChunks instead." +) From d1d0f95585d1a9bcb2684edcab454cb49adbf4eb Mon Sep 17 00:00:00 2001 From: kingdaro Date: Mon, 29 Jan 2018 20:20:59 -0500 Subject: [PATCH 021/112] style: add missing semicolons --- lib/webpack.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/webpack.js b/lib/webpack.js index 6ba1def02..de7047539 100644 --- a/lib/webpack.js +++ b/lib/webpack.js @@ -141,14 +141,14 @@ const defineMissingPluginError = (pluginName, errorMessage) => { throw new Error(errorMessage); } }); -} +}; defineMissingPluginError( "UglifyJsPlugin", "webpack.optimize.UglifyJsPlugin has been removed, please use config.optimization.minimize instead." -) +); defineMissingPluginError( "CommonsChunkPlugin", "webpack.optimize.CommonsChunkPlugin has been removed, please use config.optimization.splitChunks instead." -) +); From 152575c2b0584a6648bd9030ccdeb53ae3517c49 Mon Sep 17 00:00:00 2001 From: Leon Weidauer Date: Wed, 19 Jul 2017 00:01:34 +0200 Subject: [PATCH 022/112] Fix Stats and BinTestCases after adding "Built at" In order to pass the tests, a similar test replacement as with the millisecond values needs to happen. For the "Built at" stat all dates are replaces with Thu Jan 01 1970 00:00:00 GMT. Related to issue #5305 add semicolon --- lib/Stats.js | 3 --- test/StatsTestCases.test.js | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/Stats.js b/lib/Stats.js index 2baa071d4..c0739de83 100644 --- a/lib/Stats.js +++ b/lib/Stats.js @@ -612,9 +612,6 @@ class Stats { newline(); } if(typeof obj.time === "number") { - colors.normal("Built at: "); - colors.bold(new Date(obj.builtAt)); - newline(); colors.normal("Time: "); colors.bold(obj.time); colors.normal("ms"); diff --git a/test/StatsTestCases.test.js b/test/StatsTestCases.test.js index 21ca60dd9..05da606c6 100644 --- a/test/StatsTestCases.test.js +++ b/test/StatsTestCases.test.js @@ -97,7 +97,7 @@ describe("StatsTestCases", () => { .replace(/\u001b\[39m\u001b\[22m/g, "") .replace(/\u001b\[([0-9;]*)m/g, "") .replace(/[0-9]+(<\/CLR>)?(\s?ms)/g, "X$1$2") - .replace(/^(\s*Built at:) (.*)$/gm, "$1 Thu Jan 01 1970 00:00:00<\/CLR> GMT"); + .replace(/^(\s*Built at:) (.*)$/gm, "$1 Thu Jan 01 1970 00:00:00 GMT"); } actual = actual From b1f81a5e3eea5b4fa6f1f95d44c20a300aab4ae4 Mon Sep 17 00:00:00 2001 From: kingdaro Date: Tue, 30 Jan 2018 02:36:17 -0500 Subject: [PATCH 023/112] fix: improve error message --- lib/webpack.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/webpack.js b/lib/webpack.js index de7047539..06caeb51f 100644 --- a/lib/webpack.js +++ b/lib/webpack.js @@ -138,7 +138,7 @@ const defineMissingPluginError = (pluginName, errorMessage) => { configurable: false, enumerable: true, get() { - throw new Error(errorMessage); + throw new Error(`RemovedPluginError: ${errorMessage}`); } }); }; From 3b2e3317908d1d6b1bb70b55306e03ba85401568 Mon Sep 17 00:00:00 2001 From: kingdaro Date: Tue, 30 Jan 2018 02:37:17 -0500 Subject: [PATCH 024/112] doc: add notes to remove in v5 --- lib/webpack.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/webpack.js b/lib/webpack.js index 06caeb51f..e434929aa 100644 --- a/lib/webpack.js +++ b/lib/webpack.js @@ -143,11 +143,13 @@ const defineMissingPluginError = (pluginName, errorMessage) => { }); }; +// TODO remove in webpack 5 defineMissingPluginError( "UglifyJsPlugin", "webpack.optimize.UglifyJsPlugin has been removed, please use config.optimization.minimize instead." ); +// TODO remove in webpack 5 defineMissingPluginError( "CommonsChunkPlugin", "webpack.optimize.CommonsChunkPlugin has been removed, please use config.optimization.splitChunks instead." From 55392f23ccea649eb3cb033d34783fc091551639 Mon Sep 17 00:00:00 2001 From: kingdaro Date: Tue, 30 Jan 2018 03:01:10 -0500 Subject: [PATCH 025/112] test: added case for plugin errors --- test/cases/errors/removed-plugins/index.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 test/cases/errors/removed-plugins/index.js diff --git a/test/cases/errors/removed-plugins/index.js b/test/cases/errors/removed-plugins/index.js new file mode 100644 index 000000000..8c583bf90 --- /dev/null +++ b/test/cases/errors/removed-plugins/index.js @@ -0,0 +1,16 @@ +const webpack = require("../../../../lib/webpack"); +const should = require("should"); + +it("should error when accessing removed plugins", () => { + should.throws( + () => webpack.optimize.UglifyJsPlugin, + Error, + "webpack.optimize.UglifyJsPlugin has been removed, please use config.optimization.minimize instead." + ); + + should.throws( + () => webpack.optimize.CommonsChunkPlugin, + Error, + "webpack.optimize.CommonsChunkPlugin has been removed, please use config.optimization.splitChunks instead." + ); +}); From b6becb40c08230c96377a1b927b9f56b4c0b28e1 Mon Sep 17 00:00:00 2001 From: kingdaro Date: Tue, 30 Jan 2018 03:06:56 -0500 Subject: [PATCH 026/112] refactor(removed plugin errors): take object as first parameter --- lib/webpack.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/webpack.js b/lib/webpack.js index e434929aa..52c00bc11 100644 --- a/lib/webpack.js +++ b/lib/webpack.js @@ -133,8 +133,8 @@ exportPlugins(exports.debug = {}, { "ProfilingPlugin": () => require("./debug/ProfilingPlugin"), }); -const defineMissingPluginError = (pluginName, errorMessage) => { - Reflect.defineProperty(exports.optimize, pluginName, { +const defineMissingPluginError = (namespace, pluginName, errorMessage) => { + Reflect.defineProperty(namespace, pluginName, { configurable: false, enumerable: true, get() { @@ -145,12 +145,14 @@ const defineMissingPluginError = (pluginName, errorMessage) => { // TODO remove in webpack 5 defineMissingPluginError( + exports.optimize, "UglifyJsPlugin", "webpack.optimize.UglifyJsPlugin has been removed, please use config.optimization.minimize instead." ); // TODO remove in webpack 5 defineMissingPluginError( + exports.optimize, "CommonsChunkPlugin", "webpack.optimize.CommonsChunkPlugin has been removed, please use config.optimization.splitChunks instead." ); From 0d780b5e7e7e1000b6b6fc0619c2d75c9e90a0ef Mon Sep 17 00:00:00 2001 From: kingdaro Date: Tue, 30 Jan 2018 03:08:16 -0500 Subject: [PATCH 027/112] style: convert spaces to tabs --- test/cases/errors/removed-plugins/index.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/test/cases/errors/removed-plugins/index.js b/test/cases/errors/removed-plugins/index.js index 8c583bf90..d7fdcd995 100644 --- a/test/cases/errors/removed-plugins/index.js +++ b/test/cases/errors/removed-plugins/index.js @@ -2,15 +2,15 @@ const webpack = require("../../../../lib/webpack"); const should = require("should"); it("should error when accessing removed plugins", () => { - should.throws( - () => webpack.optimize.UglifyJsPlugin, - Error, - "webpack.optimize.UglifyJsPlugin has been removed, please use config.optimization.minimize instead." - ); + should.throws( + () => webpack.optimize.UglifyJsPlugin, + Error, + "webpack.optimize.UglifyJsPlugin has been removed, please use config.optimization.minimize instead." + ); should.throws( - () => webpack.optimize.CommonsChunkPlugin, - Error, - "webpack.optimize.CommonsChunkPlugin has been removed, please use config.optimization.splitChunks instead." - ); + () => webpack.optimize.CommonsChunkPlugin, + Error, + "webpack.optimize.CommonsChunkPlugin has been removed, please use config.optimization.splitChunks instead." + ); }); From 69c2f1a635a5d75eb517d9b328ca94dd9d175df5 Mon Sep 17 00:00:00 2001 From: kingdaro Date: Tue, 30 Jan 2018 03:28:04 -0500 Subject: [PATCH 028/112] refactor(removed plugin errors): use custom error class --- lib/RemovedPluginError.js | 3 +++ lib/webpack.js | 3 ++- test/cases/errors/removed-plugins/index.js | 5 +++-- 3 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 lib/RemovedPluginError.js diff --git a/lib/RemovedPluginError.js b/lib/RemovedPluginError.js new file mode 100644 index 000000000..1ec8dbf9a --- /dev/null +++ b/lib/RemovedPluginError.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = class RemovedPluginError extends Error {} diff --git a/lib/webpack.js b/lib/webpack.js index 52c00bc11..f73fb7167 100644 --- a/lib/webpack.js +++ b/lib/webpack.js @@ -12,6 +12,7 @@ const WebpackOptionsDefaulter = require("./WebpackOptionsDefaulter"); const validateSchema = require("./validateSchema"); const WebpackOptionsValidationError = require("./WebpackOptionsValidationError"); const webpackOptionsSchema = require("../schemas/WebpackOptions.json"); +const RemovedPluginError = require('./RemovedPluginError'); const webpack = (options, callback) => { const webpackOptionsValidationErrors = validateSchema(webpackOptionsSchema, options); @@ -138,7 +139,7 @@ const defineMissingPluginError = (namespace, pluginName, errorMessage) => { configurable: false, enumerable: true, get() { - throw new Error(`RemovedPluginError: ${errorMessage}`); + throw new RemovedPluginError(errorMessage); } }); }; diff --git a/test/cases/errors/removed-plugins/index.js b/test/cases/errors/removed-plugins/index.js index d7fdcd995..595e916f6 100644 --- a/test/cases/errors/removed-plugins/index.js +++ b/test/cases/errors/removed-plugins/index.js @@ -1,16 +1,17 @@ const webpack = require("../../../../lib/webpack"); const should = require("should"); +const RemovedPluginError = require('../../../../lib/RemovedPluginError') it("should error when accessing removed plugins", () => { should.throws( () => webpack.optimize.UglifyJsPlugin, - Error, + RemovedPluginError, "webpack.optimize.UglifyJsPlugin has been removed, please use config.optimization.minimize instead." ); should.throws( () => webpack.optimize.CommonsChunkPlugin, - Error, + RemovedPluginError, "webpack.optimize.CommonsChunkPlugin has been removed, please use config.optimization.splitChunks instead." ); }); From bfcee78d2506dc5d1bfa0119708fc37ca35c3ef2 Mon Sep 17 00:00:00 2001 From: kingdaro Date: Tue, 30 Jan 2018 03:36:09 -0500 Subject: [PATCH 029/112] test: fixed removed plugin error case --- test/cases/errors/removed-plugins/index.js | 25 +++++++++++----------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/test/cases/errors/removed-plugins/index.js b/test/cases/errors/removed-plugins/index.js index 595e916f6..b3930680f 100644 --- a/test/cases/errors/removed-plugins/index.js +++ b/test/cases/errors/removed-plugins/index.js @@ -1,17 +1,16 @@ const webpack = require("../../../../lib/webpack"); -const should = require("should"); -const RemovedPluginError = require('../../../../lib/RemovedPluginError') +const RemovedPluginError = require("../../../../lib/RemovedPluginError"); it("should error when accessing removed plugins", () => { - should.throws( - () => webpack.optimize.UglifyJsPlugin, - RemovedPluginError, - "webpack.optimize.UglifyJsPlugin has been removed, please use config.optimization.minimize instead." - ); + (() => webpack.optimize.UglifyJsPlugin) + .should.throw( + RemovedPluginError, + /webpack.optimize.UglifyJsPlugin has been removed, please use config.optimization.minimize instead./ + ); - should.throws( - () => webpack.optimize.CommonsChunkPlugin, - RemovedPluginError, - "webpack.optimize.CommonsChunkPlugin has been removed, please use config.optimization.splitChunks instead." - ); -}); + (() => webpack.optimize.CommonsChunkPlugin) + .should.throw( + RemovedPluginError, + /webpack.optimize.CommonsChunkPlugin has been removed, please use config.optimization.splitChunks instead./ + ); +}) From 96345c248799a66df66e85c09ffdee75f0a1787d Mon Sep 17 00:00:00 2001 From: kingdaro Date: Tue, 30 Jan 2018 04:07:28 -0500 Subject: [PATCH 030/112] fix style errors --- lib/RemovedPluginError.js | 4 ++-- lib/webpack.js | 2 +- test/cases/errors/removed-plugins/index.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/RemovedPluginError.js b/lib/RemovedPluginError.js index 1ec8dbf9a..f9ee9eb23 100644 --- a/lib/RemovedPluginError.js +++ b/lib/RemovedPluginError.js @@ -1,3 +1,3 @@ -'use strict'; +"use strict"; -module.exports = class RemovedPluginError extends Error {} +module.exports = class RemovedPluginError extends Error {}; diff --git a/lib/webpack.js b/lib/webpack.js index f73fb7167..da5d53923 100644 --- a/lib/webpack.js +++ b/lib/webpack.js @@ -12,7 +12,7 @@ const WebpackOptionsDefaulter = require("./WebpackOptionsDefaulter"); const validateSchema = require("./validateSchema"); const WebpackOptionsValidationError = require("./WebpackOptionsValidationError"); const webpackOptionsSchema = require("../schemas/WebpackOptions.json"); -const RemovedPluginError = require('./RemovedPluginError'); +const RemovedPluginError = require("./RemovedPluginError"); const webpack = (options, callback) => { const webpackOptionsValidationErrors = validateSchema(webpackOptionsSchema, options); diff --git a/test/cases/errors/removed-plugins/index.js b/test/cases/errors/removed-plugins/index.js index b3930680f..8e7fa4987 100644 --- a/test/cases/errors/removed-plugins/index.js +++ b/test/cases/errors/removed-plugins/index.js @@ -13,4 +13,4 @@ it("should error when accessing removed plugins", () => { RemovedPluginError, /webpack.optimize.CommonsChunkPlugin has been removed, please use config.optimization.splitChunks instead./ ); -}) +}); From 97f5849e418dad88ba3626870dd911472b0952b9 Mon Sep 17 00:00:00 2001 From: kingdaro Date: Tue, 30 Jan 2018 15:23:22 -0500 Subject: [PATCH 031/112] test(removed plugin errors): correct location/setup --- test/RemovedPlugins.unitest.js | 17 +++++++++++++++++ test/cases/errors/removed-plugins/index.js | 16 ---------------- 2 files changed, 17 insertions(+), 16 deletions(-) create mode 100644 test/RemovedPlugins.unitest.js delete mode 100644 test/cases/errors/removed-plugins/index.js diff --git a/test/RemovedPlugins.unitest.js b/test/RemovedPlugins.unitest.js new file mode 100644 index 000000000..e1dfcd7e0 --- /dev/null +++ b/test/RemovedPlugins.unitest.js @@ -0,0 +1,17 @@ +const webpack = require("../lib/webpack"); +const RemovedPluginError = require("../lib/RemovedPluginError"); +require("should"); + +describe("removed plugin errors", () => { + it("should error when accessing removed plugins", () => { + (() => webpack.optimize.UglifyJsPlugin).should.throw( + RemovedPluginError, + /webpack\.optimize\.UglifyJsPlugin has been removed, please use config\.optimization\.minimize instead\./ + ); + + (() => webpack.optimize.CommonsChunkPlugin).should.throw( + RemovedPluginError, + /webpack\.optimize\.CommonsChunkPlugin has been removed, please use config\.optimization\.splitChunks instead\./ + ); + }); +}); diff --git a/test/cases/errors/removed-plugins/index.js b/test/cases/errors/removed-plugins/index.js deleted file mode 100644 index 8e7fa4987..000000000 --- a/test/cases/errors/removed-plugins/index.js +++ /dev/null @@ -1,16 +0,0 @@ -const webpack = require("../../../../lib/webpack"); -const RemovedPluginError = require("../../../../lib/RemovedPluginError"); - -it("should error when accessing removed plugins", () => { - (() => webpack.optimize.UglifyJsPlugin) - .should.throw( - RemovedPluginError, - /webpack.optimize.UglifyJsPlugin has been removed, please use config.optimization.minimize instead./ - ); - - (() => webpack.optimize.CommonsChunkPlugin) - .should.throw( - RemovedPluginError, - /webpack.optimize.CommonsChunkPlugin has been removed, please use config.optimization.splitChunks instead./ - ); -}); From 63b4523a1552d8397feb4957168747000a210881 Mon Sep 17 00:00:00 2001 From: Florent Cailhol Date: Tue, 30 Jan 2018 21:40:44 +0100 Subject: [PATCH 032/112] Pass 'context' as constructor argument --- lib/ContextModule.js | 13 +++++++------ lib/DelegatedModule.js | 2 +- lib/DllModule.js | 3 +-- lib/ExternalModule.js | 2 +- lib/Module.js | 5 ++--- lib/MultiModule.js | 3 +-- lib/NormalModule.js | 3 +-- lib/RawModule.js | 2 +- lib/optimize/ConcatenatedModule.js | 2 +- 9 files changed, 16 insertions(+), 19 deletions(-) diff --git a/lib/ContextModule.js b/lib/ContextModule.js index 22eefbaa6..eb68215b6 100644 --- a/lib/ContextModule.js +++ b/lib/ContextModule.js @@ -17,11 +17,8 @@ class ContextModule extends Module { // resolveDependencies: (fs: FS, options: ContextOptions, (err: Error?, dependencies: Dependency[]) => void) => void // options: ContextOptions constructor(resolveDependencies, options) { - super("javascript/dynamic"); - - // Info from Factory - this.resolveDependencies = resolveDependencies; - let resource, resourceQuery; + let resource; + let resourceQuery; const queryIdx = options.resource.indexOf("?"); if(queryIdx >= 0) { resource = options.resource.substr(0, queryIdx); @@ -30,11 +27,15 @@ class ContextModule extends Module { resource = options.resource; resourceQuery = ""; } + + super("javascript/dynamic", resource); + + // Info from Factory + this.resolveDependencies = resolveDependencies; this.options = Object.assign({}, options, { resource: resource, resourceQuery: resourceQuery }); - this.context = this.options.resource; if(options.resolveOptions !== undefined) this.resolveOptions = options.resolveOptions; diff --git a/lib/DelegatedModule.js b/lib/DelegatedModule.js index b336d0038..0ba3bf6fd 100644 --- a/lib/DelegatedModule.js +++ b/lib/DelegatedModule.js @@ -13,7 +13,7 @@ const DelegatedExportsDependency = require("./dependencies/DelegatedExportsDepen class DelegatedModule extends Module { constructor(sourceRequest, data, type, userRequest, originalRequest) { - super("javascript/dynamic"); + super("javascript/dynamic", null); // Info from Factory this.sourceRequest = sourceRequest; diff --git a/lib/DllModule.js b/lib/DllModule.js index a65ce47be..be798d5da 100644 --- a/lib/DllModule.js +++ b/lib/DllModule.js @@ -9,10 +9,9 @@ const RawSource = require("webpack-sources").RawSource; class DllModule extends Module { constructor(context, dependencies, name, type) { - super("javascript/dynamic"); + super("javascript/dynamic", context); // Info from Factory - this.context = context; this.dependencies = dependencies; this.name = name; this.type = type; diff --git a/lib/ExternalModule.js b/lib/ExternalModule.js index 0ee8076f2..048291370 100644 --- a/lib/ExternalModule.js +++ b/lib/ExternalModule.js @@ -11,7 +11,7 @@ const Template = require("./Template"); class ExternalModule extends Module { constructor(request, type, userRequest) { - super("javascript/dynamic"); + super("javascript/dynamic", null); // Info from Factory this.request = request; diff --git a/lib/Module.js b/lib/Module.js index affc3f977..f4d82bf82 100644 --- a/lib/Module.js +++ b/lib/Module.js @@ -25,9 +25,10 @@ const sortByDebugId = (a, b) => { class Module extends DependenciesBlock { - constructor(type) { + constructor(type, context = null) { super(); this.type = type; + this.context = context; // Unique Id this.debugId = debugId++; @@ -37,8 +38,6 @@ class Module extends DependenciesBlock { this.renderedHash = undefined; // Info from Factory - // TODO refactor: pass as constructor argument - this.context = null; this.resolveOptions = EMPTY_RESOLVE_OPTIONS; this.factoryMeta = {}; diff --git a/lib/MultiModule.js b/lib/MultiModule.js index dfd25d468..1c983fe88 100644 --- a/lib/MultiModule.js +++ b/lib/MultiModule.js @@ -11,10 +11,9 @@ const RawSource = require("webpack-sources").RawSource; class MultiModule extends Module { constructor(context, dependencies, name) { - super("javascript/dynamic"); + super("javascript/dynamic", context); // Info from Factory - this.context = context; this.dependencies = dependencies; this.name = name; } diff --git a/lib/NormalModule.js b/lib/NormalModule.js index 5f956c958..32c8acee0 100644 --- a/lib/NormalModule.js +++ b/lib/NormalModule.js @@ -75,7 +75,7 @@ class NormalModule extends Module { generator, resolveOptions }) { - super(type); + super(type, getContext(resource)); // Info from Factory this.request = request; @@ -85,7 +85,6 @@ class NormalModule extends Module { this.parser = parser; this.generator = generator; this.resource = resource; - this.context = getContext(resource); this.loaders = loaders; if(resolveOptions !== undefined) this.resolveOptions = resolveOptions; diff --git a/lib/RawModule.js b/lib/RawModule.js index f650e28e2..a7ea6db6e 100644 --- a/lib/RawModule.js +++ b/lib/RawModule.js @@ -11,7 +11,7 @@ const RawSource = require("webpack-sources").RawSource; module.exports = class RawModule extends Module { constructor(source, identifier, readableIdentifier) { - super("javascript/dynamic"); + super("javascript/dynamic", null); this.sourceStr = source; this.identifierStr = identifier || this.sourceStr; this.readableIdentifierStr = readableIdentifier || this.identifierStr; diff --git a/lib/optimize/ConcatenatedModule.js b/lib/optimize/ConcatenatedModule.js index d497e6c71..eed84d2c8 100644 --- a/lib/optimize/ConcatenatedModule.js +++ b/lib/optimize/ConcatenatedModule.js @@ -194,7 +194,7 @@ const getPathInAst = (ast, node) => { class ConcatenatedModule extends Module { constructor(rootModule, modules) { - super("javascript/esm"); + super("javascript/esm", null); super.setChunks(rootModule._chunks); // Info from Factory From 8da8b93ed433c9491b28243b62d260deed98c4d8 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Tue, 30 Jan 2018 21:11:41 +0100 Subject: [PATCH 033/112] Work around Node environment variable bug Work around https://github.com/nodejs/node/pull/18463 by detecting the conditions under which the bug occurs and performing a simple operation that resets the error state if necessary. --- lib/EnvironmentPlugin.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/EnvironmentPlugin.js b/lib/EnvironmentPlugin.js index ad8d57336..baa9c0af6 100644 --- a/lib/EnvironmentPlugin.js +++ b/lib/EnvironmentPlugin.js @@ -7,6 +7,9 @@ const DefinePlugin = require("./DefinePlugin"); +const needsEnvVarFix = ["8", "9"].indexOf(process.versions.node.split(".")[0]) >= 0 && + process.platform === "win32"; + class EnvironmentPlugin { constructor(keys) { if(Array.isArray(keys)) { @@ -23,6 +26,13 @@ class EnvironmentPlugin { apply(compiler) { const definitions = this.keys.reduce((defs, key) => { + // TODO remove once the fix has made its way into Node 8. + // Work around https://github.com/nodejs/node/pull/18463, + // affecting Node 8 & 9 by performing an OS-level + // operation that always succeeds before reading + // environment variables: + if(needsEnvVarFix) require("os").cpus(); + const value = process.env[key] !== undefined ? process.env[key] : this.defaultValues[key]; if(value === undefined) { From 6225acefbe8f69ab1910928da236289b654da7b3 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Tue, 30 Jan 2018 21:23:20 +0000 Subject: [PATCH 034/112] fixed error with importing JSON with ProfilingPlugin --- lib/debug/ProfilingPlugin.js | 8 +++++--- test/configCases/plugins/profiling-plugin/index.js | 4 +++- test/configCases/plugins/profiling-plugin/test.json | 3 +++ 3 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 test/configCases/plugins/profiling-plugin/test.json diff --git a/lib/debug/ProfilingPlugin.js b/lib/debug/ProfilingPlugin.js index 9aa027b2e..06a8ffdbd 100644 --- a/lib/debug/ProfilingPlugin.js +++ b/lib/debug/ProfilingPlugin.js @@ -266,9 +266,11 @@ const interceptTemplateInstancesFrom = (compilation, tracer) => { }; const interceptAllHooksFor = (instance, tracer, logLabel) => { - Object.keys(instance.hooks).forEach(hookName => { - instance.hooks[hookName].intercept(makeInterceptorFor(logLabel, tracer)(hookName)); - }); + if(Object.hasOwnProperty("hooks", instance)) { + Object.keys(instance.hooks).forEach(hookName => { + instance.hooks[hookName].intercept(makeInterceptorFor(logLabel, tracer)(hookName)); + }); + } }; const interceptAllParserHooks = (moduleFactory, tracer) => { diff --git a/test/configCases/plugins/profiling-plugin/index.js b/test/configCases/plugins/profiling-plugin/index.js index a3e4de9bd..bd111552c 100644 --- a/test/configCases/plugins/profiling-plugin/index.js +++ b/test/configCases/plugins/profiling-plugin/index.js @@ -1,3 +1,5 @@ +import "./test.json"; + it("should generate a events.json file", () => { var fs = require("fs"), path = require("path"), @@ -13,4 +15,4 @@ it("should have proper setup record inside of the json stream", () => { // convert json stream to valid var source = JSON.parse(fs.readFileSync(path.join(os.tmpdir(), "events.json"), "utf-8").toString() + "{}]"); source[0].id.should.eql(1); -}); \ No newline at end of file +}); diff --git a/test/configCases/plugins/profiling-plugin/test.json b/test/configCases/plugins/profiling-plugin/test.json new file mode 100644 index 000000000..c7580e22a --- /dev/null +++ b/test/configCases/plugins/profiling-plugin/test.json @@ -0,0 +1,3 @@ +{ + "json": "should work" +} From 83f772a611388bcc0ef9636428f97e21fd715c62 Mon Sep 17 00:00:00 2001 From: ruszki Date: Mon, 29 Jan 2018 22:06:16 +0100 Subject: [PATCH 035/112] Remove footer from source maps and eval --- lib/EvalDevToolModuleTemplatePlugin.js | 5 +---- ...EvalSourceMapDevToolModuleTemplatePlugin.js | 4 +--- lib/ModuleFilenameHelpers.js | 18 ------------------ lib/SourceMapDevToolPlugin.js | 2 +- .../statsCases/chunks-development/expected.txt | 8 ++++---- .../expected.txt | 6 +++--- test/statsCases/simple/expected.txt | 2 +- 7 files changed, 11 insertions(+), 34 deletions(-) diff --git a/lib/EvalDevToolModuleTemplatePlugin.js b/lib/EvalDevToolModuleTemplatePlugin.js index 896397004..8536b9c8d 100644 --- a/lib/EvalDevToolModuleTemplatePlugin.js +++ b/lib/EvalDevToolModuleTemplatePlugin.js @@ -24,10 +24,7 @@ class EvalDevToolModuleTemplatePlugin { moduleFilenameTemplate: this.moduleFilenameTemplate, namespace: this.namespace }, moduleTemplate.runtimeTemplate.requestShortener); - const footer = ["\n", - ModuleFilenameHelpers.createFooter(module, moduleTemplate.runtimeTemplate.requestShortener), - this.sourceUrlComment.replace(/\[url\]/g, encodeURI(str).replace(/%2F/g, "/").replace(/%20/g, "_").replace(/%5E/g, "^").replace(/%5C/g, "\\").replace(/^\//, "")) - ].join("\n"); + const footer = this.sourceUrlComment.replace(/\[url\]/g, encodeURI(str).replace(/%2F/g, "/").replace(/%20/g, "_").replace(/%5E/g, "^").replace(/%5C/g, "\\").replace(/^\//, "")); const result = new RawSource(`eval(${JSON.stringify(content + footer)});`); cache.set(source, result); return result; diff --git a/lib/EvalSourceMapDevToolModuleTemplatePlugin.js b/lib/EvalSourceMapDevToolModuleTemplatePlugin.js index 2d5153e63..7fd58bedd 100644 --- a/lib/EvalSourceMapDevToolModuleTemplatePlugin.js +++ b/lib/EvalSourceMapDevToolModuleTemplatePlugin.js @@ -58,9 +58,7 @@ class EvalSourceMapDevToolModuleTemplatePlugin { }); sourceMap.sources = moduleFilenames; if(sourceMap.sourcesContent) { - sourceMap.sourcesContent = sourceMap.sourcesContent.map((content, i) => { - return typeof content === "string" ? `${content}\n\n\n${ModuleFilenameHelpers.createFooter(modules[i], moduleTemplate.runtimeTemplate.requestShortener)}` : null; - }); + sourceMap.sourcesContent = sourceMap.sourcesContent.map(content => typeof content === "string" ? content : null); } sourceMap.sourceRoot = options.sourceRoot || ""; sourceMap.file = `${module.id}.js`; diff --git a/lib/ModuleFilenameHelpers.js b/lib/ModuleFilenameHelpers.js index 1af43a227..a01071a9b 100644 --- a/lib/ModuleFilenameHelpers.js +++ b/lib/ModuleFilenameHelpers.js @@ -112,24 +112,6 @@ ModuleFilenameHelpers.createFilename = (module, options, requestShortener) => { .replace(ModuleFilenameHelpers.REGEXP_NAMESPACE, opts.namespace); }; -ModuleFilenameHelpers.createFooter = (module, requestShortener) => { - if(!module) module = ""; - if(typeof module === "string") { - return [ - "// WEBPACK FOOTER //", - `// ${requestShortener.shorten(module)}` - ].join("\n"); - } else { - return [ - "//////////////////", - "// WEBPACK FOOTER", - `// ${module.readableIdentifier(requestShortener)}`, - `// module id = ${module.id}`, - `// module chunks = ${Array.from(module.chunksIterable, c => c.id).join(" ")}` - ].join("\n"); - } -}; - ModuleFilenameHelpers.replaceDuplicates = (array, fn, comparator) => { const countMap = Object.create(null); const posMap = Object.create(null); diff --git a/lib/SourceMapDevToolPlugin.js b/lib/SourceMapDevToolPlugin.js index ff689c842..86d5ad309 100644 --- a/lib/SourceMapDevToolPlugin.js +++ b/lib/SourceMapDevToolPlugin.js @@ -185,7 +185,7 @@ class SourceMapDevToolPlugin { const moduleFilenames = modules.map(m => moduleToSourceNameMapping.get(m)); sourceMap.sources = moduleFilenames; if(sourceMap.sourcesContent && !options.noSources) { - sourceMap.sourcesContent = sourceMap.sourcesContent.map((content, i) => typeof content === "string" ? `${content}\n\n\n${ModuleFilenameHelpers.createFooter(modules[i], requestShortener)}` : null); + sourceMap.sourcesContent = sourceMap.sourcesContent.map((content) => typeof content === "string" ? content : null); } else { sourceMap.sourcesContent = undefined; } diff --git a/test/statsCases/chunks-development/expected.txt b/test/statsCases/chunks-development/expected.txt index 2513298b5..7af23136d 100644 --- a/test/statsCases/chunks-development/expected.txt +++ b/test/statsCases/chunks-development/expected.txt @@ -1,10 +1,10 @@ Hash: 5ce1f032cffdff8368b5 Time: Xms Asset Size Chunks Chunk Names -0.bundle.js 530 bytes 0 [emitted] -1.bundle.js 394 bytes 1 [emitted] -2.bundle.js 782 bytes 2 [emitted] - bundle.js 7.58 KiB main [emitted] main +0.bundle.js 431 bytes 0 [emitted] +1.bundle.js 295 bytes 1 [emitted] +2.bundle.js 584 bytes 2 [emitted] + bundle.js 7.38 KiB main [emitted] main Entrypoint main = bundle.js chunk {main} bundle.js (main) 73 bytes >{0}< >{1}< [entry] [rendered] > ./index main diff --git a/test/statsCases/preset-normal-performance-ensure-filter-sourcemaps/expected.txt b/test/statsCases/preset-normal-performance-ensure-filter-sourcemaps/expected.txt index 1e88ec95c..55bf8e5dd 100644 --- a/test/statsCases/preset-normal-performance-ensure-filter-sourcemaps/expected.txt +++ b/test/statsCases/preset-normal-performance-ensure-filter-sourcemaps/expected.txt @@ -4,10 +4,10 @@ Time: Xms 1.js 319 bytes 1 [emitted] main.js 300 KiB 2 [emitted] [big] main 3.js 257 bytes 3 [emitted] - 0.js.map 250 bytes 0 [emitted] - 1.js.map 291 bytes 1 [emitted] + 0.js.map 156 bytes 0 [emitted] + 1.js.map 197 bytes 1 [emitted] main.js.map 1.72 MiB 2 [emitted] main - 3.js.map 402 bytes 3 [emitted] + 3.js.map 214 bytes 3 [emitted] Entrypoint main [big] = main.js main.js.map [0] ./d.js 22 bytes {3} [built] [1] ./e.js 22 bytes {3} [built] diff --git a/test/statsCases/simple/expected.txt b/test/statsCases/simple/expected.txt index 47c02ed13..795055fe4 100644 --- a/test/statsCases/simple/expected.txt +++ b/test/statsCases/simple/expected.txt @@ -1,6 +1,6 @@ Hash: f0bbd0723c33cf044c2f Time: Xms Asset Size Chunks Chunk Names -bundle.js 2.89 KiB main [emitted] main +bundle.js 2.78 KiB main [emitted] main Entrypoint main = bundle.js [./index.js] 0 bytes {main} [built] \ No newline at end of file From 1a2d9360b4e51988ae369bb48550d7a825fe9b9d Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Tue, 30 Jan 2018 22:06:23 +0000 Subject: [PATCH 036/112] Update ProfilingPlugin.js --- lib/debug/ProfilingPlugin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/debug/ProfilingPlugin.js b/lib/debug/ProfilingPlugin.js index 06a8ffdbd..3b3aeffeb 100644 --- a/lib/debug/ProfilingPlugin.js +++ b/lib/debug/ProfilingPlugin.js @@ -266,7 +266,7 @@ const interceptTemplateInstancesFrom = (compilation, tracer) => { }; const interceptAllHooksFor = (instance, tracer, logLabel) => { - if(Object.hasOwnProperty("hooks", instance)) { + if(Reflect.has(instance, "hooks")) { Object.keys(instance.hooks).forEach(hookName => { instance.hooks[hookName].intercept(makeInterceptorFor(logLabel, tracer)(hookName)); }); From e4fb2b3f0ee6b01c0e501a803a286b7bef501437 Mon Sep 17 00:00:00 2001 From: ruszki Date: Wed, 31 Jan 2018 00:56:47 +0100 Subject: [PATCH 037/112] Put sourceUrlComment to its own line --- lib/EvalDevToolModuleTemplatePlugin.js | 2 +- test/statsCases/chunks-development/expected.txt | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/EvalDevToolModuleTemplatePlugin.js b/lib/EvalDevToolModuleTemplatePlugin.js index 8536b9c8d..1380a1738 100644 --- a/lib/EvalDevToolModuleTemplatePlugin.js +++ b/lib/EvalDevToolModuleTemplatePlugin.js @@ -24,7 +24,7 @@ class EvalDevToolModuleTemplatePlugin { moduleFilenameTemplate: this.moduleFilenameTemplate, namespace: this.namespace }, moduleTemplate.runtimeTemplate.requestShortener); - const footer = this.sourceUrlComment.replace(/\[url\]/g, encodeURI(str).replace(/%2F/g, "/").replace(/%20/g, "_").replace(/%5E/g, "^").replace(/%5C/g, "\\").replace(/^\//, "")); + const footer = "\n" + this.sourceUrlComment.replace(/\[url\]/g, encodeURI(str).replace(/%2F/g, "/").replace(/%20/g, "_").replace(/%5E/g, "^").replace(/%5C/g, "\\").replace(/^\//, "")); const result = new RawSource(`eval(${JSON.stringify(content + footer)});`); cache.set(source, result); return result; diff --git a/test/statsCases/chunks-development/expected.txt b/test/statsCases/chunks-development/expected.txt index 7af23136d..d7b41eec8 100644 --- a/test/statsCases/chunks-development/expected.txt +++ b/test/statsCases/chunks-development/expected.txt @@ -1,9 +1,9 @@ Hash: 5ce1f032cffdff8368b5 Time: Xms Asset Size Chunks Chunk Names -0.bundle.js 431 bytes 0 [emitted] -1.bundle.js 295 bytes 1 [emitted] -2.bundle.js 584 bytes 2 [emitted] +0.bundle.js 433 bytes 0 [emitted] +1.bundle.js 297 bytes 1 [emitted] +2.bundle.js 588 bytes 2 [emitted] bundle.js 7.38 KiB main [emitted] main Entrypoint main = bundle.js chunk {main} bundle.js (main) 73 bytes >{0}< >{1}< [entry] [rendered] From 5266a3080804fe45d18e76ff536776cc3663b788 Mon Sep 17 00:00:00 2001 From: Connor Clark Date: Tue, 30 Jan 2018 17:34:08 -0800 Subject: [PATCH 038/112] add builtAt stats option. use locale string functions --- lib/Stats.js | 12 ++++++++---- schemas/WebpackOptions.json | 4 ++++ .../async-commons-chunk-auto/webpack.config.js | 1 + .../statsCases/async-commons-chunk/webpack.config.js | 1 + .../circular-correctness/webpack.config.js | 1 + .../graph-correctness-entries/webpack.config.js | 1 + .../graph-correctness-modules/webpack.config.js | 1 + .../module-deduplication-named/webpack.config.js | 1 + .../module-deduplication/webpack.config.js | 1 + test/statsCases/parse-error/webpack.config.js | 1 + test/statsCases/preset-mixed-array/webpack.config.js | 1 + test/statsCases/split-chunks/webpack.config.js | 1 + 12 files changed, 22 insertions(+), 4 deletions(-) diff --git a/lib/Stats.js b/lib/Stats.js index c0739de83..52d0bbd00 100644 --- a/lib/Stats.js +++ b/lib/Stats.js @@ -105,6 +105,7 @@ class Stats { const showEnv = optionOrLocalFallback(options.env, false); const showVersion = optionOrLocalFallback(options.version, true); const showTimings = optionOrLocalFallback(options.timings, true); + const showBuiltAt = optionOrLocalFallback(options.builtAt, true); const showAssets = optionOrLocalFallback(options.assets, true); const showEntrypoints = optionOrLocalFallback(options.entrypoints, true); const showChunks = optionOrLocalFallback(options.chunks, !forToString); @@ -252,6 +253,9 @@ class Stats { if(showHash) obj.hash = this.hash; if(showTimings && this.startTime && this.endTime) { obj.time = this.endTime - this.startTime; + } + + if(showBuiltAt && this.endTime) { obj.builtAt = this.endTime; } @@ -618,11 +622,11 @@ class Stats { newline(); } if(typeof obj.builtAt === "number") { - const now = (new Date(obj.builtAt)).toString().split(" "); + const builtAtDate = new Date(obj.builtAt); colors.normal("Built at: "); - colors.normal(`${now[0]} ${now[1]} ${now[2]} ${now[3]} `); - colors.bold(now[4]); - colors.normal(now[6] ? ` ${now[5]} ${now[6]}` : ` ${now[5]}`); + colors.normal(builtAtDate.toLocaleDateString()); + colors.normal(" "); + colors.bold(builtAtDate.toLocaleTimeString()); newline(); } if(obj.env) { diff --git a/schemas/WebpackOptions.json b/schemas/WebpackOptions.json index 93f843125..6d251b7b4 100644 --- a/schemas/WebpackOptions.json +++ b/schemas/WebpackOptions.json @@ -1655,6 +1655,10 @@ "type": "boolean", "description": "add timing information" }, + "builtAt": { + "type": "boolean", + "description": "add built at time information" + }, "performance": { "type": "boolean", "description": "add performance hint flags" diff --git a/test/statsCases/async-commons-chunk-auto/webpack.config.js b/test/statsCases/async-commons-chunk-auto/webpack.config.js index 1bcd43b45..11bed473a 100644 --- a/test/statsCases/async-commons-chunk-auto/webpack.config.js +++ b/test/statsCases/async-commons-chunk-auto/webpack.config.js @@ -2,6 +2,7 @@ const path = require("path"); const stats = { hash: false, timings: false, + builtAt: false, assets: false, chunks: true, chunkOrigins: true, diff --git a/test/statsCases/async-commons-chunk/webpack.config.js b/test/statsCases/async-commons-chunk/webpack.config.js index 0267bba92..a1ffaa9d9 100644 --- a/test/statsCases/async-commons-chunk/webpack.config.js +++ b/test/statsCases/async-commons-chunk/webpack.config.js @@ -9,6 +9,7 @@ module.exports = { stats: { hash: false, timings: false, + builtAt: false, assets: false, chunks: true, chunkOrigins: true, diff --git a/test/statsCases/circular-correctness/webpack.config.js b/test/statsCases/circular-correctness/webpack.config.js index ffb3a6458..8be75aa1e 100644 --- a/test/statsCases/circular-correctness/webpack.config.js +++ b/test/statsCases/circular-correctness/webpack.config.js @@ -7,6 +7,7 @@ module.exports = { stats: { hash: false, timings: false, + builtAt: false, assets: false, chunks: true, chunkModules: true, diff --git a/test/statsCases/graph-correctness-entries/webpack.config.js b/test/statsCases/graph-correctness-entries/webpack.config.js index 7b762d698..f6f18dc87 100644 --- a/test/statsCases/graph-correctness-entries/webpack.config.js +++ b/test/statsCases/graph-correctness-entries/webpack.config.js @@ -10,6 +10,7 @@ module.exports = { stats: { hash: false, timings: false, + builtAt: false, assets: false, chunks: true, chunkModules: true, diff --git a/test/statsCases/graph-correctness-modules/webpack.config.js b/test/statsCases/graph-correctness-modules/webpack.config.js index 7b762d698..f6f18dc87 100644 --- a/test/statsCases/graph-correctness-modules/webpack.config.js +++ b/test/statsCases/graph-correctness-modules/webpack.config.js @@ -10,6 +10,7 @@ module.exports = { stats: { hash: false, timings: false, + builtAt: false, assets: false, chunks: true, chunkModules: true, diff --git a/test/statsCases/module-deduplication-named/webpack.config.js b/test/statsCases/module-deduplication-named/webpack.config.js index c7831a494..039f03011 100644 --- a/test/statsCases/module-deduplication-named/webpack.config.js +++ b/test/statsCases/module-deduplication-named/webpack.config.js @@ -11,6 +11,7 @@ module.exports = { stats: { hash: false, timings: false, + builtAt: false, chunks: true, chunkModules: true, modules: false diff --git a/test/statsCases/module-deduplication/webpack.config.js b/test/statsCases/module-deduplication/webpack.config.js index c7831a494..039f03011 100644 --- a/test/statsCases/module-deduplication/webpack.config.js +++ b/test/statsCases/module-deduplication/webpack.config.js @@ -11,6 +11,7 @@ module.exports = { stats: { hash: false, timings: false, + builtAt: false, chunks: true, chunkModules: true, modules: false diff --git a/test/statsCases/parse-error/webpack.config.js b/test/statsCases/parse-error/webpack.config.js index 234dd9439..1bc2a16d0 100644 --- a/test/statsCases/parse-error/webpack.config.js +++ b/test/statsCases/parse-error/webpack.config.js @@ -5,6 +5,7 @@ module.exports = { entry: "./index", stats: { timings: false, + builtAt: false, hash: false, modules: true, chunks: false diff --git a/test/statsCases/preset-mixed-array/webpack.config.js b/test/statsCases/preset-mixed-array/webpack.config.js index ca9b7998f..937dffe6d 100644 --- a/test/statsCases/preset-mixed-array/webpack.config.js +++ b/test/statsCases/preset-mixed-array/webpack.config.js @@ -22,6 +22,7 @@ module.exports = [ entrypoints: true, hash: false, timings: false, + builtAt: false, chunks: false, assets: false } diff --git a/test/statsCases/split-chunks/webpack.config.js b/test/statsCases/split-chunks/webpack.config.js index c8ad3e02f..e34f6c342 100644 --- a/test/statsCases/split-chunks/webpack.config.js +++ b/test/statsCases/split-chunks/webpack.config.js @@ -1,6 +1,7 @@ const stats = { hash: false, timings: false, + builtAt: false, assets: false, chunks: true, chunkOrigins: true, From 61b75b7ce69535736e2e6460ca092ecde146e76c Mon Sep 17 00:00:00 2001 From: Joe Bottigliero Date: Wed, 31 Jan 2018 15:42:42 -0600 Subject: [PATCH 039/112] update ajv + ajv-keywords - updates to `ajv@6.1.0` - updates to `ajv-keywords@3.1.0` (required for _better_ validation in webpack/webpack-cli#240) --- package.json | 4 ++-- yarn.lock | 22 +++++++++++++++++----- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index e2342f224..86f8d1366 100644 --- a/package.json +++ b/package.json @@ -6,8 +6,8 @@ "dependencies": { "acorn": "^5.0.0", "acorn-dynamic-import": "^2.0.0", - "ajv": "^5.1.5", - "ajv-keywords": "^2.0.0", + "ajv": "^6.1.0", + "ajv-keywords": "^3.1.0", "async": "^2.1.2", "enhanced-resolve": "^3.4.0", "escope": "^3.6.0", diff --git a/yarn.lock b/yarn.lock index 549a78661..4b75781a6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -55,9 +55,9 @@ ajv-keywords@^1.0.0: version "1.5.1" resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.5.1.tgz#314dd0a4b3368fad3dfcdc54ede6171b886daf3c" -ajv-keywords@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-2.1.0.tgz#a296e17f7bfae7c1ce4f7e0de53d29cb32162df0" +ajv-keywords@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.1.0.tgz#ac2b27939c543e95d2c06e7f7f5c27be4aa543be" ajv@^4.7.0, ajv@^4.9.1: version "4.11.8" @@ -66,7 +66,7 @@ ajv@^4.7.0, ajv@^4.9.1: co "^4.6.0" json-stable-stringify "^1.0.1" -ajv@^5.0.0, ajv@^5.1.5, ajv@^5.2.0: +ajv@^5.0.0, ajv@^5.2.0: version "5.2.2" resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.2.2.tgz#47c68d69e86f5d953103b0074a9430dc63da5e39" dependencies: @@ -75,6 +75,14 @@ ajv@^5.0.0, ajv@^5.1.5, ajv@^5.2.0: json-schema-traverse "^0.3.0" json-stable-stringify "^1.0.1" +ajv@^6.1.0: + version "6.1.1" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.1.1.tgz#978d597fbc2b7d0e5a5c3ddeb149a682f2abfa0e" + dependencies: + fast-deep-equal "^1.0.0" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.3.0" + align-text@^0.1.1, align-text@^0.1.3: version "0.1.4" resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" @@ -1360,6 +1368,10 @@ fast-deep-equal@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz#96256a3bc975595eb36d82e9929d060d893439ff" +fast-json-stable-stringify@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" + fast-levenshtein@~2.0.4: version "2.0.6" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" @@ -3967,7 +3979,7 @@ ua-parser-js@^0.7.9: version "0.7.14" resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.14.tgz#110d53fa4c3f326c121292bbeac904d2e03387ca" -uglify-js@^2.6, uglify-js@^2.8.29: +uglify-js@^2.4.19, uglify-js@^2.6, uglify-js@^2.8.29: version "2.8.29" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" dependencies: From 52954228ee8014ac2c995f0c115e5d363dd2b018 Mon Sep 17 00:00:00 2001 From: Mihail Bodrov Date: Thu, 1 Feb 2018 02:59:08 +0300 Subject: [PATCH 040/112] Remove needless includes --- lib/ConstPlugin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ConstPlugin.js b/lib/ConstPlugin.js index f285bf1fb..05df375a1 100644 --- a/lib/ConstPlugin.js +++ b/lib/ConstPlugin.js @@ -9,7 +9,7 @@ const ParserHelpers = require("./ParserHelpers"); const getQuery = (request) => { const i = request.indexOf("?"); - return request.includes("?") ? request.substr(i) : ""; + return i !== -1 ? request.substr(i) : ""; }; const collectDeclaration = (declarations, pattern) => { From 3e0baf8303d9af89124c0cb7915db25e1cb7dce6 Mon Sep 17 00:00:00 2001 From: Francis John Date: Sun, 28 Jan 2018 18:21:36 -0800 Subject: [PATCH 041/112] Expose output path in Stats object https://github.com/webpack/webpack/issues/6373 --- lib/Stats.js | 4 ++++ test/Stats.unittest.js | 42 +++++++++++++++++++++++++++++++++++++++++- 2 files changed, 45 insertions(+), 1 deletion(-) diff --git a/lib/Stats.js b/lib/Stats.js index 0556b19e5..d3db31924 100644 --- a/lib/Stats.js +++ b/lib/Stats.js @@ -133,6 +133,7 @@ class Stats { const sortModules = optionsOrFallback(options.modulesSort, "id"); const sortChunks = optionsOrFallback(options.chunksSort, "id"); const sortAssets = optionsOrFallback(options.assetsSort, ""); + const showOutputPath = optionOrLocalFallback(options.outputPath, true); if(!showCachedModules) { excludeModules.push((ident, module) => !module.built); @@ -266,6 +267,9 @@ class Stats { hash: this.compilation.hash }); } + if(showOutputPath) { + obj.outputPath = this.compilation.mainTemplate.outputOptions.path; + } if(showAssets) { const assetsByFile = {}; const compilationAssets = Object.keys(compilation.assets); diff --git a/test/Stats.unittest.js b/test/Stats.unittest.js index dcd9e9d19..29d1bf382 100644 --- a/test/Stats.unittest.js +++ b/test/Stats.unittest.js @@ -2,8 +2,8 @@ "use strict"; require("should"); - const Stats = require("../lib/Stats"); +const packageJson = require("../package.json") describe("Stats", () => { describe("Error Handling", () => { @@ -94,6 +94,9 @@ describe("Stats", () => { children: [], hash: "1234", mainTemplate: { + outputOptions: { + path: "" + }, getPublicPath: () => "path" }, compiler: { @@ -104,6 +107,43 @@ describe("Stats", () => { obj.errors[0].should.be.equal("firstError"); }); }); + describe("toJson", () => { + it("returns plain object representation", () => { + const mockStats = new Stats({ + errors: [], + warnings: [], + assets: [], + entrypoints: {}, + chunks: [], + modules: [], + children: [], + hash: "1234", + mainTemplate: { + outputOptions: { + path: "/" + }, + getPublicPath: () => "path" + } + }); + const result = mockStats.toJson(); + result.should.deepEqual({ + assets: [], + assetsByChunkName: {}, + children: [], + chunks: [], + entrypoints: {}, + errors: [], + filteredAssets: 0, + filteredModules: 0, + hash: "1234", + modules: [], + outputPath: "/", + publicPath: "path", + version: packageJson.version, + warnings: [] + }); + }); + }); describe("Presets", () => { describe("presetToOptions", () => { it("returns correct object with 'Normal'", () => { From 1a7fff843da99a5db3c52ce9d5fe760ccb49a31c Mon Sep 17 00:00:00 2001 From: Francis John Date: Wed, 31 Jan 2018 17:23:26 -0800 Subject: [PATCH 042/112] Fix test after rebase --- test/Stats.unittest.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/Stats.unittest.js b/test/Stats.unittest.js index 29d1bf382..e216de833 100644 --- a/test/Stats.unittest.js +++ b/test/Stats.unittest.js @@ -3,7 +3,7 @@ require("should"); const Stats = require("../lib/Stats"); -const packageJson = require("../package.json") +const packageJson = require("../package.json"); describe("Stats", () => { describe("Error Handling", () => { @@ -113,7 +113,7 @@ describe("Stats", () => { errors: [], warnings: [], assets: [], - entrypoints: {}, + entrypoints: new Map(), chunks: [], modules: [], children: [], @@ -123,6 +123,9 @@ describe("Stats", () => { path: "/" }, getPublicPath: () => "path" + }, + compiler: { + context: "" } }); const result = mockStats.toJson(); @@ -132,9 +135,9 @@ describe("Stats", () => { children: [], chunks: [], entrypoints: {}, - errors: [], filteredAssets: 0, filteredModules: 0, + errors: [], hash: "1234", modules: [], outputPath: "/", From 99f100dae721e8ab6de49d4e6d46c8c6be00065b Mon Sep 17 00:00:00 2001 From: Francis John Date: Wed, 31 Jan 2018 19:46:56 -0800 Subject: [PATCH 043/112] Add property to config schema --- schemas/WebpackOptions.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/schemas/WebpackOptions.json b/schemas/WebpackOptions.json index 93f843125..756148c57 100644 --- a/schemas/WebpackOptions.json +++ b/schemas/WebpackOptions.json @@ -1822,6 +1822,10 @@ "type": "boolean", "description": "Add public path information" }, + "outputPath": { + "type": "boolean", + "description": "Add output path information" + }, "providedExports": { "type": "boolean", "description": "show exports provided by modules" From f668785bedeea5a05b4d148cd3aa3728c61c2e12 Mon Sep 17 00:00:00 2001 From: Francis John Date: Wed, 31 Jan 2018 19:47:08 -0800 Subject: [PATCH 044/112] Add option in integration test --- test/statsCases/simple-more-info/webpack.config.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/statsCases/simple-more-info/webpack.config.js b/test/statsCases/simple-more-info/webpack.config.js index 868f8447c..6b5ab815e 100644 --- a/test/statsCases/simple-more-info/webpack.config.js +++ b/test/statsCases/simple-more-info/webpack.config.js @@ -14,6 +14,7 @@ module.exports = { cachedAssets: true, source: true, errorDetails: true, - publicPath: true + publicPath: true, + outputPath: true, } }; From 0000f4e3cbee1c884e2eb41e60174a1c97fb0c69 Mon Sep 17 00:00:00 2001 From: Francis John Date: Wed, 31 Jan 2018 19:48:30 -0800 Subject: [PATCH 045/112] Update Stats.unittest.js --- test/Stats.unittest.js | 1 + 1 file changed, 1 insertion(+) diff --git a/test/Stats.unittest.js b/test/Stats.unittest.js index e216de833..065ffa318 100644 --- a/test/Stats.unittest.js +++ b/test/Stats.unittest.js @@ -2,6 +2,7 @@ "use strict"; require("should"); + const Stats = require("../lib/Stats"); const packageJson = require("../package.json"); From 02fabaf41c2f67709a5993a88bdc32d9d74746e9 Mon Sep 17 00:00:00 2001 From: Francis John Date: Wed, 31 Jan 2018 20:00:29 -0800 Subject: [PATCH 046/112] Update Stats.js --- lib/Stats.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Stats.js b/lib/Stats.js index d3db31924..da8e0b20c 100644 --- a/lib/Stats.js +++ b/lib/Stats.js @@ -133,7 +133,7 @@ class Stats { const sortModules = optionsOrFallback(options.modulesSort, "id"); const sortChunks = optionsOrFallback(options.chunksSort, "id"); const sortAssets = optionsOrFallback(options.assetsSort, ""); - const showOutputPath = optionOrLocalFallback(options.outputPath, true); + const showOutputPath = optionOrLocalFallback(options.outputPath, !forToString); if(!showCachedModules) { excludeModules.push((ident, module) => !module.built); From 9fde04d299a46b10aad36ea9d88ce2f815599c38 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Thu, 1 Feb 2018 17:50:03 +0100 Subject: [PATCH 047/112] handle single option in options defaulter change runtime chunk naming schema --- lib/WebpackOptionsDefaulter.js | 13 +++++++++++++ lib/optimize/RuntimeChunkPlugin.js | 12 ++++++++---- schemas/WebpackOptions.json | 17 +++++++++++++++++ test/statsCases/runtime-chunk/expected.txt | 4 ++-- 4 files changed, 40 insertions(+), 6 deletions(-) diff --git a/lib/WebpackOptionsDefaulter.js b/lib/WebpackOptionsDefaulter.js index 431631189..80d10f099 100644 --- a/lib/WebpackOptionsDefaulter.js +++ b/lib/WebpackOptionsDefaulter.js @@ -181,6 +181,19 @@ class WebpackOptionsDefaulter extends OptionsDefaulter { test: /[\\/]node_modules[\\/]/, priority: -10 }); + this.set("optimization.runtimeChunk", "call", value => { + if(value === "single") { + return { + name: "runtime" + }; + } + if(value === true) { + return { + name: entrypoint => `runtime~${entrypoint.name}` + }; + } + return value; + }); this.set("optimization.noEmitOnErrors", "make", options => isProductionLikeMode(options)); this.set("optimization.namedModules", "make", options => options.mode === "development"); this.set("optimization.namedChunks", "make", options => options.mode === "development"); diff --git a/lib/optimize/RuntimeChunkPlugin.js b/lib/optimize/RuntimeChunkPlugin.js index 5823d5b64..0aa1cd07f 100644 --- a/lib/optimize/RuntimeChunkPlugin.js +++ b/lib/optimize/RuntimeChunkPlugin.js @@ -6,18 +6,22 @@ module.exports = class RuntimeChunkPlugin { constructor(options) { - this.single = options === "single"; + this.options = Object.assign({ + name: entrypoint => `runtime~${entrypoint.name}` + }, options); } apply(compiler) { compiler.hooks.thisCompilation.tap("RuntimeChunkPlugin", compilation => { compilation.hooks.optimizeChunksAdvanced.tap("RuntimeChunkPlugin", () => { - const singleRuntimeChunk = this.single ? compilation.addChunk("runtime") : undefined; - for(const entrypoint of compilation.entrypoints.values()) { const chunk = entrypoint.getRuntimeChunk(); if(chunk.getNumberOfModules() > 0) { - const newChunk = this.single ? singleRuntimeChunk : compilation.addChunk(entrypoint.name + "-runtime"); + let name = this.options.name; + if(typeof name === "function") { + name = name(entrypoint); + } + const newChunk = compilation.addChunk(name); entrypoint.unshiftChunk(newChunk); newChunk.addGroup(entrypoint); entrypoint.setRuntimeChunk(newChunk); diff --git a/schemas/WebpackOptions.json b/schemas/WebpackOptions.json index 76a198366..588ae1a77 100644 --- a/schemas/WebpackOptions.json +++ b/schemas/WebpackOptions.json @@ -1492,6 +1492,23 @@ "enum": [ "single" ] + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "name": { + "description": "The name or name factory for the runtime chunks", + "oneOf": [ + { + "type": "string" + }, + { + "instanceof": "Function" + } + ] + } + } } ] }, diff --git a/test/statsCases/runtime-chunk/expected.txt b/test/statsCases/runtime-chunk/expected.txt index 021eea1a4..0eb0020bc 100644 --- a/test/statsCases/runtime-chunk/expected.txt +++ b/test/statsCases/runtime-chunk/expected.txt @@ -1,2 +1,2 @@ -Entrypoint e1 = e1-runtime.js e1.js -Entrypoint e2 = e2-runtime.js e2.js \ No newline at end of file +Entrypoint e1 = runtime~e1.js e1.js +Entrypoint e2 = runtime~e2.js e2.js \ No newline at end of file From 5ee61f891076736eeb4c41fdb31e1bb19bc9f821 Mon Sep 17 00:00:00 2001 From: Ben Rothman Date: Thu, 1 Feb 2018 11:08:57 -0600 Subject: [PATCH 048/112] add "multiple" string option for runtimeChunk config --- lib/WebpackOptionsDefaulter.js | 2 +- schemas/WebpackOptions.json | 3 ++- test/statsCases/runtime-chunk/webpack.config.js | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/WebpackOptionsDefaulter.js b/lib/WebpackOptionsDefaulter.js index 80d10f099..d2c041216 100644 --- a/lib/WebpackOptionsDefaulter.js +++ b/lib/WebpackOptionsDefaulter.js @@ -187,7 +187,7 @@ class WebpackOptionsDefaulter extends OptionsDefaulter { name: "runtime" }; } - if(value === true) { + if(value === true || value === "multiple") { return { name: entrypoint => `runtime~${entrypoint.name}` }; diff --git a/schemas/WebpackOptions.json b/schemas/WebpackOptions.json index 588ae1a77..6975483dc 100644 --- a/schemas/WebpackOptions.json +++ b/schemas/WebpackOptions.json @@ -1490,7 +1490,8 @@ }, { "enum": [ - "single" + "single", + "multiple" ] }, { diff --git a/test/statsCases/runtime-chunk/webpack.config.js b/test/statsCases/runtime-chunk/webpack.config.js index 05f67abda..0c78ac98f 100644 --- a/test/statsCases/runtime-chunk/webpack.config.js +++ b/test/statsCases/runtime-chunk/webpack.config.js @@ -15,6 +15,6 @@ module.exports = { reasons: false }, optimization: { - runtimeChunk: true + runtimeChunk: "multiple" } }; From 18c1e28da8b7fc5c57bd5cb1a4eb0e6b3b5efde6 Mon Sep 17 00:00:00 2001 From: Ben Rothman Date: Thu, 1 Feb 2018 12:13:27 -0600 Subject: [PATCH 049/112] fix tests --- test/statsCases/runtime-chunk-single/webpack.config.js | 1 + test/statsCases/runtime-chunk/webpack.config.js | 1 + 2 files changed, 2 insertions(+) diff --git a/test/statsCases/runtime-chunk-single/webpack.config.js b/test/statsCases/runtime-chunk-single/webpack.config.js index 9fd5dccf3..0a10b262f 100644 --- a/test/statsCases/runtime-chunk-single/webpack.config.js +++ b/test/statsCases/runtime-chunk-single/webpack.config.js @@ -10,6 +10,7 @@ module.exports = { stats: { hash: false, timings: false, + builtAt: false, assets: false, modules: false, reasons: true diff --git a/test/statsCases/runtime-chunk/webpack.config.js b/test/statsCases/runtime-chunk/webpack.config.js index 0c78ac98f..0abe241e7 100644 --- a/test/statsCases/runtime-chunk/webpack.config.js +++ b/test/statsCases/runtime-chunk/webpack.config.js @@ -10,6 +10,7 @@ module.exports = { stats: { hash: false, timings: false, + builtAt: false, assets: false, modules: false, reasons: false From 28288c82bd7e485831eb85a2bb9475cf1da88def Mon Sep 17 00:00:00 2001 From: ruszki Date: Thu, 1 Feb 2018 19:36:55 +0100 Subject: [PATCH 050/112] Remove unnecessary conditions --- lib/EvalSourceMapDevToolModuleTemplatePlugin.js | 3 --- lib/SourceMapDevToolPlugin.js | 4 +--- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/EvalSourceMapDevToolModuleTemplatePlugin.js b/lib/EvalSourceMapDevToolModuleTemplatePlugin.js index 7fd58bedd..f501045b4 100644 --- a/lib/EvalSourceMapDevToolModuleTemplatePlugin.js +++ b/lib/EvalSourceMapDevToolModuleTemplatePlugin.js @@ -57,9 +57,6 @@ class EvalSourceMapDevToolModuleTemplatePlugin { return filename; }); sourceMap.sources = moduleFilenames; - if(sourceMap.sourcesContent) { - sourceMap.sourcesContent = sourceMap.sourcesContent.map(content => typeof content === "string" ? content : null); - } sourceMap.sourceRoot = options.sourceRoot || ""; sourceMap.file = `${module.id}.js`; diff --git a/lib/SourceMapDevToolPlugin.js b/lib/SourceMapDevToolPlugin.js index 86d5ad309..69d85d87b 100644 --- a/lib/SourceMapDevToolPlugin.js +++ b/lib/SourceMapDevToolPlugin.js @@ -184,9 +184,7 @@ class SourceMapDevToolPlugin { const modules = task.modules; const moduleFilenames = modules.map(m => moduleToSourceNameMapping.get(m)); sourceMap.sources = moduleFilenames; - if(sourceMap.sourcesContent && !options.noSources) { - sourceMap.sourcesContent = sourceMap.sourcesContent.map((content) => typeof content === "string" ? content : null); - } else { + if(options.noSources) { sourceMap.sourcesContent = undefined; } sourceMap.sourceRoot = options.sourceRoot || ""; From 722711a632abc905e8daef3c6ee33dd58029eb87 Mon Sep 17 00:00:00 2001 From: kingdaro Date: Thu, 1 Feb 2018 21:15:43 -0500 Subject: [PATCH 051/112] refactor(RemovedPluginError): extend WebpackError --- lib/RemovedPluginError.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/RemovedPluginError.js b/lib/RemovedPluginError.js index f9ee9eb23..772464fb0 100644 --- a/lib/RemovedPluginError.js +++ b/lib/RemovedPluginError.js @@ -1,3 +1,13 @@ "use strict"; -module.exports = class RemovedPluginError extends Error {}; +const WebpackError = require("./WebpackError"); + +module.exports = class RemovedPluginError extends WebpackError { + constructor(message) { + super(); + + this.message = message; + + Error.captureStackTrace(this, this.constructor); + } +}; From 6ebdc6b309523024df491eccd963f9613ea87c90 Mon Sep 17 00:00:00 2001 From: Florent Cailhol Date: Wed, 31 Jan 2018 19:52:50 +0100 Subject: [PATCH 052/112] Truncate generated chunk name if too long Fixes #6426 --- lib/optimize/SplitChunksPlugin.js | 15 +++- test/statsCases/split-chunks/expected.txt | 71 ++++++++++++++++++- .../statsCases/split-chunks/webpack.config.js | 20 ++++++ 3 files changed, 104 insertions(+), 2 deletions(-) diff --git a/lib/optimize/SplitChunksPlugin.js b/lib/optimize/SplitChunksPlugin.js index c5ba6f52d..10e9820cc 100644 --- a/lib/optimize/SplitChunksPlugin.js +++ b/lib/optimize/SplitChunksPlugin.js @@ -4,9 +4,14 @@ */ "use strict"; +const crypto = require("crypto"); const SortableSet = require("../util/SortableSet"); const GraphHelpers = require("../GraphHelpers"); +const hashFilename = (name) => { + return crypto.createHash("md5").update(name).digest("hex").slice(0, 8); +}; + const sortByIdentifier = (a, b) => { if(a.identifier() > b.identifier()) return 1; if(a.identifier() < b.identifier()) return -1; @@ -85,7 +90,15 @@ module.exports = class SplitChunksPlugin { const names = chunks.map(c => c.name); if(!names.every(Boolean)) return; names.sort(); - const name = (cacheGroup && cacheGroup !== "default" ? cacheGroup + "~" : "") + names.join("~"); + let name = (cacheGroup && cacheGroup !== "default" ? cacheGroup + "~" : "") + names.join("~"); + // Filenames and paths can't be too long otherwise an + // ENAMETOOLONG error is raised. If the generated name if too + // long, it is truncated and a hash is appended. The limit has + // been set to 100 to prevent `[name].[chunkhash].[ext]` from + // generating a 256+ character string. + if(name.length > 100) { + name = name.slice(0, 100) + "~" + hashFilename(name); + } return name; }; return fn; diff --git a/test/statsCases/split-chunks/expected.txt b/test/statsCases/split-chunks/expected.txt index 2b44d6ad6..21e4a4245 100644 --- a/test/statsCases/split-chunks/expected.txt +++ b/test/statsCases/split-chunks/expected.txt @@ -191,4 +191,73 @@ Child manual: > ./c c [0] ./d.js 20 bytes {2} {3} {4} {6} {7} {8} [built] [1] ./f.js 20 bytes {1} {3} {4} {7} {8} [built] - [5] ./c.js 72 bytes {4} {8} [built] \ No newline at end of file + [5] ./c.js 72 bytes {4} {8} [built] +Child name-too-long: + Entrypoint main = main.js + Entrypoint aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa = vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~716093be.js aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.js aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.js + Entrypoint bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb = vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~716093be.js aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.js bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.js + Entrypoint cccccccccccccccccccccccccccccc = vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~716093be.js vendors~async-c~cccccccccccccccccccccccccccccc.js cccccccccccccccccccccccccccccc.js + chunk {0} vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~716093be.js (vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~716093be) 20 bytes <{9}> ={4}= ={12}= ={2}= ={11}= ={10}= ={1}= ={3}= ={8}= ={7}= ={6}= >{1}< >{5}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~716093be) + > ./c cccccccccccccccccccccccccccccc + > ./b bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb + > ./a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + > ./c [8] ./index.js 3:0-47 + > ./b [8] ./index.js 2:0-47 + > ./a [8] ./index.js 1:0-47 + [1] ./node_modules/x.js 20 bytes {0} {3} [built] + chunk {1} async-b~async-c~async-g~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccccccccccccccccccc.js (async-b~async-c~async-g~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccccccccccccccccccc) 20 bytes <{0}> <{2}> <{10}> <{3}> <{6}> <{9}> ={5}= ={0}= ={4}= ={3}= ={8}= ={2}= ={7}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccccccccccccccccccc) + > ./g [] 6:0-47 + > ./g [] 6:0-47 + > ./c [8] ./index.js 3:0-47 + > ./b [8] ./index.js 2:0-47 + [2] ./f.js 20 bytes {1} {11} {12} [built] + chunk {2} aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.js (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb) 20 bytes <{9}> ={0}= ={11}= ={10}= ={1}= ={7}= ={3}= ={6}= >{1}< >{5}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb) + > ./b bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb + > ./a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + > ./b [8] ./index.js 2:0-47 + > ./a [8] ./index.js 1:0-47 + [3] ./node_modules/y.js 20 bytes {2} [built] + chunk {3} aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccc~e7d53185.js (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccc~e7d53185) 40 bytes <{9}> ={0}= ={4}= ={1}= ={8}= ={2}= ={6}= >{1}< >{5}< [rendered] split chunk (cache group: default) (name: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccc~e7d53185) + > ./c [8] ./index.js 3:0-47 + > ./a [8] ./index.js 1:0-47 + [0] ./d.js 20 bytes {3} {7} {10} {11} {12} [built] + [1] ./node_modules/x.js 20 bytes {0} {3} [built] + chunk {4} vendors~async-c~cccccccccccccccccccccccccccccc.js (vendors~async-c~cccccccccccccccccccccccccccccc) 20 bytes <{9}> ={0}= ={12}= ={1}= ={3}= ={8}= [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-c~cccccccccccccccccccccccccccccc) + > ./c cccccccccccccccccccccccccccccc + > ./c [8] ./index.js 3:0-47 + [7] ./node_modules/z.js 20 bytes {4} [built] + chunk {5} async-g.js (async-g) 34 bytes <{0}> <{2}> <{10}> <{3}> <{6}> ={1}= [rendered] + > ./g [] 6:0-47 + > ./g [] 6:0-47 + [9] ./g.js 34 bytes {5} [built] + chunk {6} async-a.js (async-a) 156 bytes <{9}> ={0}= ={2}= ={3}= >{1}< >{5}< [rendered] + > ./a [8] ./index.js 1:0-47 + [6] ./a.js + 1 modules 156 bytes {6} {10} [built] + | ./a.js 121 bytes [built] + | ./e.js 20 bytes [built] + chunk {7} async-b.js (async-b) 92 bytes <{9}> ={0}= ={2}= ={1}= [rendered] + > ./b [8] ./index.js 2:0-47 + [0] ./d.js 20 bytes {3} {7} {10} {11} {12} [built] + [4] ./b.js 72 bytes {7} {11} [built] + chunk {8} async-c.js (async-c) 72 bytes <{9}> ={0}= ={4}= ={1}= ={3}= [rendered] + > ./c [8] ./index.js 3:0-47 + [5] ./c.js 72 bytes {8} {12} [built] + chunk {9} main.js (main) 147 bytes >{0}< >{2}< >{1}< >{7}< >{3}< >{6}< >{4}< >{8}< [entry] [rendered] + > ./ main + [8] ./index.js 147 bytes {9} [built] + chunk {10} aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.js (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) 176 bytes ={0}= ={2}= >{1}< >{5}< [entry] [rendered] + > ./a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + [0] ./d.js 20 bytes {3} {7} {10} {11} {12} [built] + [6] ./a.js + 1 modules 156 bytes {6} {10} [built] + | ./a.js 121 bytes [built] + | ./e.js 20 bytes [built] + chunk {11} bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.js (bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb) 112 bytes ={0}= ={2}= [entry] [rendered] + > ./b bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb + [0] ./d.js 20 bytes {3} {7} {10} {11} {12} [built] + [2] ./f.js 20 bytes {1} {11} {12} [built] + [4] ./b.js 72 bytes {7} {11} [built] + chunk {12} cccccccccccccccccccccccccccccc.js (cccccccccccccccccccccccccccccc) 112 bytes ={0}= ={4}= [entry] [rendered] + > ./c cccccccccccccccccccccccccccccc + [0] ./d.js 20 bytes {3} {7} {10} {11} {12} [built] + [2] ./f.js 20 bytes {1} {11} {12} [built] + [5] ./c.js 72 bytes {8} {12} [built] \ No newline at end of file diff --git a/test/statsCases/split-chunks/webpack.config.js b/test/statsCases/split-chunks/webpack.config.js index c8ad3e02f..869c46ada 100644 --- a/test/statsCases/split-chunks/webpack.config.js +++ b/test/statsCases/split-chunks/webpack.config.js @@ -78,6 +78,26 @@ module.exports = [ } }, stats + }, + { + name: "name-too-long", + mode: "production", + entry: { + main: "./", + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa: "./a", + bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb: "./b", + cccccccccccccccccccccccccccccc: "./c" + }, + output: { + filename: "[name].js" + }, + optimization: { + splitChunks: { + minSize: 0, + chunks: "all" + } + }, + stats } ]; From 0b3eabdf15a376871ab9c89c06f5823503a90d65 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Mon, 5 Feb 2018 09:13:47 +0100 Subject: [PATCH 053/112] fix naming of file --- test/{RemovedPlugins.unitest.js => RemovedPlugins.unittest.js} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename test/{RemovedPlugins.unitest.js => RemovedPlugins.unittest.js} (100%) diff --git a/test/RemovedPlugins.unitest.js b/test/RemovedPlugins.unittest.js similarity index 100% rename from test/RemovedPlugins.unitest.js rename to test/RemovedPlugins.unittest.js From 4dd521f498e79fcddccfe9dbd033ab723fe7027c Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Thu, 1 Feb 2018 18:21:52 +0100 Subject: [PATCH 054/112] fixes #6413 --- lib/optimize/SplitChunksPlugin.js | 2 +- .../async-commons-chunk-auto/expected.txt | 168 +++++++++--------- test/statsCases/split-chunks-issue-6413/a.js | 1 + test/statsCases/split-chunks-issue-6413/b.js | 1 + test/statsCases/split-chunks-issue-6413/c.js | 1 + .../split-chunks-issue-6413/common.js | 1 + .../split-chunks-issue-6413/expected.txt | 23 +++ .../split-chunks-issue-6413/index.js | 3 + .../split-chunks-issue-6413/node_modules/x.js | 1 + .../split-chunks-issue-6413/webpack.config.js | 26 +++ test/statsCases/split-chunks/expected.txt | 137 +++++++------- 11 files changed, 209 insertions(+), 155 deletions(-) create mode 100644 test/statsCases/split-chunks-issue-6413/a.js create mode 100644 test/statsCases/split-chunks-issue-6413/b.js create mode 100644 test/statsCases/split-chunks-issue-6413/c.js create mode 100644 test/statsCases/split-chunks-issue-6413/common.js create mode 100644 test/statsCases/split-chunks-issue-6413/expected.txt create mode 100644 test/statsCases/split-chunks-issue-6413/index.js create mode 100644 test/statsCases/split-chunks-issue-6413/node_modules/x.js create mode 100644 test/statsCases/split-chunks-issue-6413/webpack.config.js diff --git a/lib/optimize/SplitChunksPlugin.js b/lib/optimize/SplitChunksPlugin.js index 10e9820cc..f3c3270d9 100644 --- a/lib/optimize/SplitChunksPlugin.js +++ b/lib/optimize/SplitChunksPlugin.js @@ -34,7 +34,7 @@ const getModulesSize = modules => { }; const isOverlap = (a, b) => { - for(const item of a) { + for(const item of a.keys()) { if(b.has(item)) return true; } return false; diff --git a/test/statsCases/async-commons-chunk-auto/expected.txt b/test/statsCases/async-commons-chunk-auto/expected.txt index 038a6142b..68fd07201 100644 --- a/test/statsCases/async-commons-chunk-auto/expected.txt +++ b/test/statsCases/async-commons-chunk-auto/expected.txt @@ -62,38 +62,37 @@ Child default: Entrypoint a = default/a.js Entrypoint b = default/b.js Entrypoint c = default/c.js - chunk {0} default/vendors~async-a~async-b~async-c.js (vendors~async-a~async-b~async-c) 20 bytes <{9}> ={8}= ={1}= ={3}= ={7}= ={2}= ={6}= ={5}= >{1}< >{4}< [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b~async-c) + chunk {0} default/vendors~async-a~async-b~async-c.js (vendors~async-a~async-b~async-c) 20 bytes <{9}> ={8}= ={1}= ={3}= ={7}= ={2}= ={6}= ={5}= >{3}< >{4}< [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b~async-c) > ./c [8] ./index.js 3:0-47 > ./b [8] ./index.js 2:0-47 > ./a [8] ./index.js 1:0-47 - [1] ./node_modules/x.js 20 bytes {0} {3} {10} {11} {12} [built] - chunk {1} default/async-b~async-c~async-g.js (async-b~async-c~async-g) 20 bytes <{0}> <{2}> <{3}> <{5}> <{10}> <{9}> ={4}= ={0}= ={8}= ={3}= ={7}= ={2}= ={6}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g) - > ./g [] 6:0-47 - > ./g [] 6:0-47 + [1] ./node_modules/x.js 20 bytes {0} {10} {11} {12} [built] + chunk {1} default/async-a~async-b~async-c.js (async-a~async-b~async-c) 20 bytes <{9}> ={0}= ={8}= ={3}= ={7}= ={2}= ={6}= ={5}= >{3}< >{4}< [rendered] split chunk (cache group: default) (name: async-a~async-b~async-c) > ./c [8] ./index.js 3:0-47 > ./b [8] ./index.js 2:0-47 - [2] ./f.js 20 bytes {1} {11} {12} [built] - chunk {2} default/async-a~async-b.js (async-a~async-b) 20 bytes <{9}> ={0}= ={1}= ={6}= ={3}= ={5}= >{1}< >{4}< [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b) + > ./a [8] ./index.js 1:0-47 + [0] ./d.js 20 bytes {1} {10} {11} {12} [built] + chunk {2} default/vendors~async-a~async-b.js (vendors~async-a~async-b) 20 bytes <{9}> ={0}= ={1}= ={6}= ={5}= >{3}< >{4}< [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b) > ./b [8] ./index.js 2:0-47 > ./a [8] ./index.js 1:0-47 [3] ./node_modules/y.js 20 bytes {2} {10} {11} [built] - chunk {3} default/async-a~async-b~async-c.js (async-a~async-b~async-c) 40 bytes <{9}> ={0}= ={8}= ={1}= ={7}= ={2}= ={5}= >{1}< >{4}< [rendered] split chunk (cache group: default) (name: async-a~async-b~async-c) + chunk {3} default/async-b~async-c~async-g.js (async-b~async-c~async-g) 20 bytes <{0}> <{2}> <{1}> <{5}> <{10}> <{9}> ={4}= ={0}= ={8}= ={1}= ={7}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g) + > ./g [] 6:0-47 + > ./g [] 6:0-47 > ./c [8] ./index.js 3:0-47 - > ./a [8] ./index.js 1:0-47 - [0] ./d.js 20 bytes {3} {6} {10} {11} {12} [built] - [1] ./node_modules/x.js 20 bytes {0} {3} {10} {11} {12} [built] - chunk {4} default/async-g.js (async-g) 34 bytes <{0}> <{2}> <{3}> <{5}> <{10}> ={1}= [rendered] + [2] ./f.js 20 bytes {3} {6} {11} {12} [built] + chunk {4} default/async-g.js (async-g) 34 bytes <{0}> <{2}> <{1}> <{5}> <{10}> ={3}= [rendered] > ./g [] 6:0-47 > ./g [] 6:0-47 [9] ./g.js 34 bytes {4} [built] - chunk {5} default/async-a.js (async-a) 156 bytes <{9}> ={0}= ={2}= ={3}= >{1}< >{4}< [rendered] + chunk {5} default/async-a.js (async-a) 156 bytes <{9}> ={0}= ={2}= ={1}= >{3}< >{4}< [rendered] > ./a [8] ./index.js 1:0-47 [7] ./a.js + 1 modules 156 bytes {5} {10} [built] | ./a.js 121 bytes [built] | ./e.js 20 bytes [built] chunk {6} default/async-b.js (async-b) 92 bytes <{9}> ={0}= ={2}= ={1}= [rendered] > ./b [8] ./index.js 2:0-47 - [0] ./d.js 20 bytes {3} {6} {10} {11} {12} [built] + [2] ./f.js 20 bytes {3} {6} {11} {12} [built] [5] ./b.js 72 bytes {6} {11} [built] chunk {7} default/async-c.js (async-c) 72 bytes <{9}> ={0}= ={8}= ={1}= ={3}= [rendered] > ./c [8] ./index.js 3:0-47 @@ -101,29 +100,29 @@ Child default: chunk {8} default/vendors~async-c.js (vendors~async-c) 20 bytes <{9}> ={0}= ={1}= ={3}= ={7}= [rendered] split chunk (cache group: vendors) (name: vendors~async-c) > ./c [8] ./index.js 3:0-47 [4] ./node_modules/z.js 20 bytes {8} {12} [built] - chunk {9} default/main.js (main) 147 bytes >{0}< >{2}< >{1}< >{6}< >{3}< >{5}< >{8}< >{7}< [entry] [rendered] + chunk {9} default/main.js (main) 147 bytes >{0}< >{2}< >{1}< >{5}< >{6}< >{8}< >{3}< >{7}< [entry] [rendered] > ./ main [8] ./index.js 147 bytes {9} [built] - chunk {10} default/a.js (a) 216 bytes >{1}< >{4}< [entry] [rendered] + chunk {10} default/a.js (a) 216 bytes >{3}< >{4}< [entry] [rendered] > ./a a - [0] ./d.js 20 bytes {3} {6} {10} {11} {12} [built] - [1] ./node_modules/x.js 20 bytes {0} {3} {10} {11} {12} [built] + [0] ./d.js 20 bytes {1} {10} {11} {12} [built] + [1] ./node_modules/x.js 20 bytes {0} {10} {11} {12} [built] [3] ./node_modules/y.js 20 bytes {2} {10} {11} [built] [7] ./a.js + 1 modules 156 bytes {5} {10} [built] | ./a.js 121 bytes [built] | ./e.js 20 bytes [built] chunk {11} default/b.js (b) 152 bytes [entry] [rendered] > ./b b - [0] ./d.js 20 bytes {3} {6} {10} {11} {12} [built] - [1] ./node_modules/x.js 20 bytes {0} {3} {10} {11} {12} [built] - [2] ./f.js 20 bytes {1} {11} {12} [built] + [0] ./d.js 20 bytes {1} {10} {11} {12} [built] + [1] ./node_modules/x.js 20 bytes {0} {10} {11} {12} [built] + [2] ./f.js 20 bytes {3} {6} {11} {12} [built] [3] ./node_modules/y.js 20 bytes {2} {10} {11} [built] [5] ./b.js 72 bytes {6} {11} [built] chunk {12} default/c.js (c) 152 bytes [entry] [rendered] > ./c c - [0] ./d.js 20 bytes {3} {6} {10} {11} {12} [built] - [1] ./node_modules/x.js 20 bytes {0} {3} {10} {11} {12} [built] - [2] ./f.js 20 bytes {1} {11} {12} [built] + [0] ./d.js 20 bytes {1} {10} {11} {12} [built] + [1] ./node_modules/x.js 20 bytes {0} {10} {11} {12} [built] + [2] ./f.js 20 bytes {3} {6} {11} {12} [built] [4] ./node_modules/z.js 20 bytes {8} {12} [built] [6] ./c.js 72 bytes {7} {12} [built] Child vendors: @@ -189,7 +188,7 @@ Child multiple-vendors: Entrypoint a = multiple-vendors/libs-x.js multiple-vendors/a.js Entrypoint b = multiple-vendors/libs-x.js multiple-vendors/b.js Entrypoint c = multiple-vendors/libs-x.js multiple-vendors/c.js - chunk {0} multiple-vendors/libs-x.js (libs-x) 20 bytes <{8}> ={11}= ={10}= ={9}= ={7}= ={1}= ={6}= ={2}= ={5}= ={4}= >{1}< >{3}< [initial] [rendered] split chunk (cache group: libs) (name: libs-x) + chunk {0} multiple-vendors/libs-x.js (libs-x) 20 bytes <{9}> ={12}= ={11}= ={10}= ={7}= ={1}= ={6}= ={2}= ={5}= ={4}= >{8}< >{3}< [initial] [rendered] split chunk (cache group: libs) (name: libs-x) > ./c c > ./b b > ./a a @@ -197,125 +196,126 @@ Child multiple-vendors: > ./b [8] ./index.js 2:0-47 > ./a [8] ./index.js 1:0-47 [2] ./node_modules/x.js 20 bytes {0} [built] - chunk {1} multiple-vendors/async-b~async-c~async-g~b~c.js (async-b~async-c~async-g~b~c) 20 bytes <{0}> <{2}> <{4}> <{9}> <{8}> ={3}= ={0}= ={7}= ={6}= ={2}= ={5}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g~b~c) - > ./g [] 6:0-47 - > ./g [] 6:0-47 + chunk {1} multiple-vendors/a~async-a~async-b~async-c~b~c.js (a~async-a~async-b~async-c~b~c) 20 bytes <{9}> ={0}= ={7}= ={6}= ={2}= ={5}= ={4}= >{8}< >{3}< [rendered] split chunk (cache group: default) (name: a~async-a~async-b~async-c~b~c) > ./c [8] ./index.js 3:0-47 > ./b [8] ./index.js 2:0-47 - [1] ./f.js 20 bytes {1} {10} {11} [built] - chunk {2} multiple-vendors/a~async-a~async-b~b.js (a~async-a~async-b~b) 20 bytes <{8}> ={0}= ={1}= ={5}= ={4}= >{1}< >{3}< [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~b) + > ./a [8] ./index.js 1:0-47 + [1] ./d.js 20 bytes {1} {10} {11} {12} [built] + chunk {2} multiple-vendors/vendors~a~async-a~async-b~b.js (vendors~a~async-a~async-b~b) 20 bytes <{9}> ={0}= ={1}= ={5}= ={4}= >{8}< >{3}< [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~b) > ./b [8] ./index.js 2:0-47 > ./a [8] ./index.js 1:0-47 - [3] ./node_modules/y.js 20 bytes {2} {9} {10} [built] - chunk {3} multiple-vendors/async-g.js (async-g) 34 bytes <{0}> <{2}> <{4}> <{9}> ={1}= [rendered] + [3] ./node_modules/y.js 20 bytes {2} {10} {11} [built] + chunk {3} multiple-vendors/async-g.js (async-g) 34 bytes <{0}> <{10}> <{2}> <{1}> <{4}> ={8}= [rendered] > ./g [] 6:0-47 > ./g [] 6:0-47 [9] ./g.js 34 bytes {3} [built] - chunk {4} multiple-vendors/async-a.js (async-a) 176 bytes <{8}> ={0}= ={2}= >{1}< >{3}< [rendered] + chunk {4} multiple-vendors/async-a.js (async-a) 156 bytes <{9}> ={0}= ={2}= ={1}= >{8}< >{3}< [rendered] > ./a [8] ./index.js 1:0-47 - [0] ./d.js 20 bytes {4} {5} {6} {9} {10} {11} [built] - [7] ./a.js + 1 modules 156 bytes {4} {9} [built] + [7] ./a.js + 1 modules 156 bytes {4} {10} [built] | ./a.js 121 bytes [built] | ./e.js 20 bytes [built] - chunk {5} multiple-vendors/async-b.js (async-b) 92 bytes <{8}> ={0}= ={2}= ={1}= [rendered] + chunk {5} multiple-vendors/async-b.js (async-b) 92 bytes <{9}> ={0}= ={2}= ={1}= [rendered] > ./b [8] ./index.js 2:0-47 - [0] ./d.js 20 bytes {4} {5} {6} {9} {10} {11} [built] - [5] ./b.js 72 bytes {5} {10} [built] - chunk {6} multiple-vendors/async-c.js (async-c) 92 bytes <{8}> ={0}= ={7}= ={1}= [rendered] + [0] ./f.js 20 bytes {5} {6} {8} {11} {12} [built] + [5] ./b.js 72 bytes {5} {11} [built] + chunk {6} multiple-vendors/async-c.js (async-c) 92 bytes <{9}> ={0}= ={7}= ={1}= [rendered] > ./c [8] ./index.js 3:0-47 - [0] ./d.js 20 bytes {4} {5} {6} {9} {10} {11} [built] - [6] ./c.js 72 bytes {6} {11} [built] - chunk {7} multiple-vendors/vendors~async-c~c.js (vendors~async-c~c) 20 bytes <{8}> ={0}= ={1}= ={6}= [rendered] split chunk (cache group: vendors) (name: vendors~async-c~c) + [0] ./f.js 20 bytes {5} {6} {8} {11} {12} [built] + [6] ./c.js 72 bytes {6} {12} [built] + chunk {7} multiple-vendors/vendors~async-c~c.js (vendors~async-c~c) 20 bytes <{9}> ={0}= ={1}= ={6}= [rendered] split chunk (cache group: vendors) (name: vendors~async-c~c) > ./c [8] ./index.js 3:0-47 - [4] ./node_modules/z.js 20 bytes {7} {11} [built] - chunk {8} multiple-vendors/main.js (main) 147 bytes >{0}< >{2}< >{1}< >{5}< >{4}< >{7}< >{6}< [entry] [rendered] + [4] ./node_modules/z.js 20 bytes {7} {12} [built] + chunk {8} multiple-vendors/async-b~async-c~async-g~b~c.js (async-b~async-c~async-g~b~c) 20 bytes <{0}> <{10}> <{2}> <{1}> <{4}> ={3}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g~b~c) + > ./g [] 6:0-47 + > ./g [] 6:0-47 + [0] ./f.js 20 bytes {5} {6} {8} {11} {12} [built] + chunk {9} multiple-vendors/main.js (main) 147 bytes >{0}< >{2}< >{1}< >{4}< >{5}< >{7}< >{6}< [entry] [rendered] > ./ main - [8] ./index.js 147 bytes {8} [built] - chunk {9} multiple-vendors/a.js (a) 196 bytes ={0}= >{1}< >{3}< [entry] [rendered] + [8] ./index.js 147 bytes {9} [built] + chunk {10} multiple-vendors/a.js (a) 196 bytes ={0}= >{8}< >{3}< [entry] [rendered] > ./a a - [0] ./d.js 20 bytes {4} {5} {6} {9} {10} {11} [built] - [3] ./node_modules/y.js 20 bytes {2} {9} {10} [built] - [7] ./a.js + 1 modules 156 bytes {4} {9} [built] + [1] ./d.js 20 bytes {1} {10} {11} {12} [built] + [3] ./node_modules/y.js 20 bytes {2} {10} {11} [built] + [7] ./a.js + 1 modules 156 bytes {4} {10} [built] | ./a.js 121 bytes [built] | ./e.js 20 bytes [built] - chunk {10} multiple-vendors/b.js (b) 132 bytes ={0}= [entry] [rendered] + chunk {11} multiple-vendors/b.js (b) 132 bytes ={0}= [entry] [rendered] > ./b b - [0] ./d.js 20 bytes {4} {5} {6} {9} {10} {11} [built] - [1] ./f.js 20 bytes {1} {10} {11} [built] - [3] ./node_modules/y.js 20 bytes {2} {9} {10} [built] - [5] ./b.js 72 bytes {5} {10} [built] - chunk {11} multiple-vendors/c.js (c) 132 bytes ={0}= [entry] [rendered] + [0] ./f.js 20 bytes {5} {6} {8} {11} {12} [built] + [1] ./d.js 20 bytes {1} {10} {11} {12} [built] + [3] ./node_modules/y.js 20 bytes {2} {10} {11} [built] + [5] ./b.js 72 bytes {5} {11} [built] + chunk {12} multiple-vendors/c.js (c) 132 bytes ={0}= [entry] [rendered] > ./c c - [0] ./d.js 20 bytes {4} {5} {6} {9} {10} {11} [built] - [1] ./f.js 20 bytes {1} {10} {11} [built] - [4] ./node_modules/z.js 20 bytes {7} {11} [built] - [6] ./c.js 72 bytes {6} {11} [built] + [0] ./f.js 20 bytes {5} {6} {8} {11} {12} [built] + [1] ./d.js 20 bytes {1} {10} {11} {12} [built] + [4] ./node_modules/z.js 20 bytes {7} {12} [built] + [6] ./c.js 72 bytes {6} {12} [built] Child all: Entrypoint main = all/main.js Entrypoint a = all/vendors~a~async-a~async-b~async-c~b~c.js all/a~async-a~async-b~b.js all/a.js Entrypoint b = all/vendors~a~async-a~async-b~async-c~b~c.js all/a~async-a~async-b~b.js all/b.js Entrypoint c = all/vendors~a~async-a~async-b~async-c~b~c.js all/vendors~async-c~c.js all/c.js - chunk {0} all/vendors~a~async-a~async-b~async-c~b~c.js (vendors~a~async-a~async-b~async-c~b~c) 20 bytes <{9}> ={4}= ={12}= ={2}= ={11}= ={10}= ={1}= ={3}= ={8}= ={7}= ={6}= >{1}< >{5}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~async-c~b~c) + chunk {0} all/vendors~a~async-a~async-b~async-c~b~c.js (vendors~a~async-a~async-b~async-c~b~c) 20 bytes <{9}> ={4}= ={12}= ={3}= ={11}= ={10}= ={1}= ={2}= ={8}= ={7}= ={6}= >{2}< >{5}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~async-c~b~c) > ./c c > ./b b > ./a a > ./c [8] ./index.js 3:0-47 > ./b [8] ./index.js 2:0-47 > ./a [8] ./index.js 1:0-47 - [1] ./node_modules/x.js 20 bytes {0} {3} [built] - chunk {1} all/async-b~async-c~async-g~b~c.js (async-b~async-c~async-g~b~c) 20 bytes <{0}> <{2}> <{10}> <{3}> <{6}> <{9}> ={5}= ={0}= ={4}= ={3}= ={8}= ={2}= ={7}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g~b~c) + [2] ./node_modules/x.js 20 bytes {0} [built] + chunk {1} all/a~async-a~async-b~async-c~b~c.js (a~async-a~async-b~async-c~b~c) 20 bytes <{9}> ={0}= ={4}= ={2}= ={8}= ={3}= ={7}= ={6}= >{2}< >{5}< [rendered] split chunk (cache group: default) (name: a~async-a~async-b~async-c~b~c) + > ./c [8] ./index.js 3:0-47 + > ./b [8] ./index.js 2:0-47 + > ./a [8] ./index.js 1:0-47 + [0] ./d.js 20 bytes {1} {10} {11} {12} [built] + chunk {2} all/async-b~async-c~async-g~b~c.js (async-b~async-c~async-g~b~c) 20 bytes <{0}> <{3}> <{1}> <{6}> <{10}> <{9}> ={5}= ={0}= ={4}= ={1}= ={8}= ={3}= ={7}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g~b~c) > ./g [] 6:0-47 > ./g [] 6:0-47 > ./c [8] ./index.js 3:0-47 > ./b [8] ./index.js 2:0-47 - [2] ./f.js 20 bytes {1} {11} {12} [built] - chunk {2} all/a~async-a~async-b~b.js (a~async-a~async-b~b) 20 bytes <{9}> ={0}= ={11}= ={10}= ={1}= ={7}= ={3}= ={6}= >{1}< >{5}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~b) + [1] ./f.js 20 bytes {2} {11} {12} [built] + chunk {3} all/a~async-a~async-b~b.js (a~async-a~async-b~b) 20 bytes <{9}> ={0}= ={11}= ={10}= ={1}= ={2}= ={7}= ={6}= >{2}< >{5}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~b) > ./b b > ./a a > ./b [8] ./index.js 2:0-47 > ./a [8] ./index.js 1:0-47 - [3] ./node_modules/y.js 20 bytes {2} [built] - chunk {3} all/a~async-a~async-b~async-c~b~c.js (a~async-a~async-b~async-c~b~c) 40 bytes <{9}> ={0}= ={4}= ={1}= ={8}= ={2}= ={6}= >{1}< >{5}< [rendered] split chunk (cache group: default) (name: a~async-a~async-b~async-c~b~c) - > ./c [8] ./index.js 3:0-47 - > ./a [8] ./index.js 1:0-47 - [0] ./d.js 20 bytes {3} {7} {10} {11} {12} [built] - [1] ./node_modules/x.js 20 bytes {0} {3} [built] - chunk {4} all/vendors~async-c~c.js (vendors~async-c~c) 20 bytes <{9}> ={0}= ={12}= ={1}= ={3}= ={8}= [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-c~c) + [3] ./node_modules/y.js 20 bytes {3} [built] + chunk {4} all/vendors~async-c~c.js (vendors~async-c~c) 20 bytes <{9}> ={0}= ={12}= ={1}= ={2}= ={8}= [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-c~c) > ./c c > ./c [8] ./index.js 3:0-47 [7] ./node_modules/z.js 20 bytes {4} [built] - chunk {5} all/async-g.js (async-g) 34 bytes <{0}> <{2}> <{10}> <{3}> <{6}> ={1}= [rendered] + chunk {5} all/async-g.js (async-g) 34 bytes <{0}> <{3}> <{1}> <{6}> <{10}> ={2}= [rendered] > ./g [] 6:0-47 > ./g [] 6:0-47 [9] ./g.js 34 bytes {5} [built] - chunk {6} all/async-a.js (async-a) 156 bytes <{9}> ={0}= ={2}= ={3}= >{1}< >{5}< [rendered] + chunk {6} all/async-a.js (async-a) 156 bytes <{9}> ={0}= ={3}= ={1}= >{2}< >{5}< [rendered] > ./a [8] ./index.js 1:0-47 [6] ./a.js + 1 modules 156 bytes {6} {10} [built] | ./a.js 121 bytes [built] | ./e.js 20 bytes [built] - chunk {7} all/async-b.js (async-b) 92 bytes <{9}> ={0}= ={2}= ={1}= [rendered] + chunk {7} all/async-b.js (async-b) 72 bytes <{9}> ={0}= ={3}= ={1}= ={2}= [rendered] > ./b [8] ./index.js 2:0-47 - [0] ./d.js 20 bytes {3} {7} {10} {11} {12} [built] [4] ./b.js 72 bytes {7} {11} [built] - chunk {8} all/async-c.js (async-c) 72 bytes <{9}> ={0}= ={4}= ={1}= ={3}= [rendered] + chunk {8} all/async-c.js (async-c) 72 bytes <{9}> ={0}= ={4}= ={1}= ={2}= [rendered] > ./c [8] ./index.js 3:0-47 [5] ./c.js 72 bytes {8} {12} [built] - chunk {9} all/main.js (main) 147 bytes >{0}< >{2}< >{1}< >{7}< >{3}< >{6}< >{4}< >{8}< [entry] [rendered] + chunk {9} all/main.js (main) 147 bytes >{0}< >{3}< >{1}< >{2}< >{7}< >{6}< >{4}< >{8}< [entry] [rendered] > ./ main [8] ./index.js 147 bytes {9} [built] - chunk {10} all/a.js (a) 176 bytes ={0}= ={2}= >{1}< >{5}< [entry] [rendered] + chunk {10} all/a.js (a) 176 bytes ={0}= ={3}= >{2}< >{5}< [entry] [rendered] > ./a a - [0] ./d.js 20 bytes {3} {7} {10} {11} {12} [built] + [0] ./d.js 20 bytes {1} {10} {11} {12} [built] [6] ./a.js + 1 modules 156 bytes {6} {10} [built] | ./a.js 121 bytes [built] | ./e.js 20 bytes [built] - chunk {11} all/b.js (b) 112 bytes ={0}= ={2}= [entry] [rendered] + chunk {11} all/b.js (b) 112 bytes ={0}= ={3}= [entry] [rendered] > ./b b - [0] ./d.js 20 bytes {3} {7} {10} {11} {12} [built] - [2] ./f.js 20 bytes {1} {11} {12} [built] + [0] ./d.js 20 bytes {1} {10} {11} {12} [built] + [1] ./f.js 20 bytes {2} {11} {12} [built] [4] ./b.js 72 bytes {7} {11} [built] chunk {12} all/c.js (c) 112 bytes ={0}= ={4}= [entry] [rendered] > ./c c - [0] ./d.js 20 bytes {3} {7} {10} {11} {12} [built] - [2] ./f.js 20 bytes {1} {11} {12} [built] + [0] ./d.js 20 bytes {1} {10} {11} {12} [built] + [1] ./f.js 20 bytes {2} {11} {12} [built] [5] ./c.js 72 bytes {8} {12} [built] \ No newline at end of file diff --git a/test/statsCases/split-chunks-issue-6413/a.js b/test/statsCases/split-chunks-issue-6413/a.js new file mode 100644 index 000000000..a8a18775e --- /dev/null +++ b/test/statsCases/split-chunks-issue-6413/a.js @@ -0,0 +1 @@ +import "./common"; diff --git a/test/statsCases/split-chunks-issue-6413/b.js b/test/statsCases/split-chunks-issue-6413/b.js new file mode 100644 index 000000000..a8a18775e --- /dev/null +++ b/test/statsCases/split-chunks-issue-6413/b.js @@ -0,0 +1 @@ +import "./common"; diff --git a/test/statsCases/split-chunks-issue-6413/c.js b/test/statsCases/split-chunks-issue-6413/c.js new file mode 100644 index 000000000..a8a18775e --- /dev/null +++ b/test/statsCases/split-chunks-issue-6413/c.js @@ -0,0 +1 @@ +import "./common"; diff --git a/test/statsCases/split-chunks-issue-6413/common.js b/test/statsCases/split-chunks-issue-6413/common.js new file mode 100644 index 000000000..aa1b69c68 --- /dev/null +++ b/test/statsCases/split-chunks-issue-6413/common.js @@ -0,0 +1 @@ +import "x" diff --git a/test/statsCases/split-chunks-issue-6413/expected.txt b/test/statsCases/split-chunks-issue-6413/expected.txt new file mode 100644 index 000000000..5080b9411 --- /dev/null +++ b/test/statsCases/split-chunks-issue-6413/expected.txt @@ -0,0 +1,23 @@ +Entrypoint main = main.js +chunk {0} vendors~async-a~async-b~async-c.js (vendors~async-a~async-b~async-c) 20 bytes <{5}> ={1}= ={4}= ={3}= ={2}= [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b~async-c) + > ./c [5] ./index.js 3:0-47 + > ./b [5] ./index.js 2:0-47 + > ./a [5] ./index.js 1:0-47 + [1] ./node_modules/x.js 20 bytes {0} [built] +chunk {1} async-a~async-b~async-c.js (async-a~async-b~async-c) 11 bytes <{5}> ={0}= ={4}= ={3}= ={2}= [rendered] split chunk (cache group: default) (name: async-a~async-b~async-c) + > ./c [5] ./index.js 3:0-47 + > ./b [5] ./index.js 2:0-47 + > ./a [5] ./index.js 1:0-47 + [0] ./common.js 11 bytes {1} [built] +chunk {2} async-a.js (async-a) 19 bytes <{5}> ={0}= ={1}= [rendered] + > ./a [5] ./index.js 1:0-47 + [2] ./a.js 19 bytes {2} [built] +chunk {3} async-b.js (async-b) 19 bytes <{5}> ={0}= ={1}= [rendered] + > ./b [5] ./index.js 2:0-47 + [3] ./b.js 19 bytes {3} [built] +chunk {4} async-c.js (async-c) 19 bytes <{5}> ={0}= ={1}= [rendered] + > ./c [5] ./index.js 3:0-47 + [4] ./c.js 19 bytes {4} [built] +chunk {5} main.js (main) 147 bytes >{0}< >{1}< >{2}< >{3}< >{4}< [entry] [rendered] + > ./ main + [5] ./index.js 147 bytes {5} [built] \ No newline at end of file diff --git a/test/statsCases/split-chunks-issue-6413/index.js b/test/statsCases/split-chunks-issue-6413/index.js new file mode 100644 index 000000000..5dfec91bc --- /dev/null +++ b/test/statsCases/split-chunks-issue-6413/index.js @@ -0,0 +1,3 @@ +import(/* webpackChunkName: "async-a" */ "./a"); +import(/* webpackChunkName: "async-b" */ "./b"); +import(/* webpackChunkName: "async-c" */ "./c"); diff --git a/test/statsCases/split-chunks-issue-6413/node_modules/x.js b/test/statsCases/split-chunks-issue-6413/node_modules/x.js new file mode 100644 index 000000000..3fd5ecc7a --- /dev/null +++ b/test/statsCases/split-chunks-issue-6413/node_modules/x.js @@ -0,0 +1 @@ +export default "x"; diff --git a/test/statsCases/split-chunks-issue-6413/webpack.config.js b/test/statsCases/split-chunks-issue-6413/webpack.config.js new file mode 100644 index 000000000..d34b354c6 --- /dev/null +++ b/test/statsCases/split-chunks-issue-6413/webpack.config.js @@ -0,0 +1,26 @@ +const stats = { + hash: false, + timings: false, + builtAt: false, + assets: false, + chunks: true, + chunkOrigins: true, + entrypoints: true, + modules: false +}; +module.exports = { + name: "default", + mode: "production", + entry: { + main: "./" + }, + output: { + filename: "[name].js" + }, + optimization: { + splitChunks: { + minSize: 0 // enforce all + } + }, + stats +}; diff --git a/test/statsCases/split-chunks/expected.txt b/test/statsCases/split-chunks/expected.txt index 21e4a4245..80b01318d 100644 --- a/test/statsCases/split-chunks/expected.txt +++ b/test/statsCases/split-chunks/expected.txt @@ -3,38 +3,37 @@ Child default: Entrypoint a = default/a.js Entrypoint b = default/b.js Entrypoint c = default/c.js - chunk {0} default/vendors~async-a~async-b~async-c.js (vendors~async-a~async-b~async-c) 20 bytes <{9}> ={8}= ={1}= ={3}= ={7}= ={2}= ={6}= ={5}= >{1}< >{4}< [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b~async-c) + chunk {0} default/vendors~async-a~async-b~async-c.js (vendors~async-a~async-b~async-c) 20 bytes <{9}> ={8}= ={1}= ={3}= ={7}= ={2}= ={6}= ={5}= >{3}< >{4}< [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b~async-c) > ./c [8] ./index.js 3:0-47 > ./b [8] ./index.js 2:0-47 > ./a [8] ./index.js 1:0-47 - [1] ./node_modules/x.js 20 bytes {0} {3} {10} {11} {12} [built] - chunk {1} default/async-b~async-c~async-g.js (async-b~async-c~async-g) 20 bytes <{0}> <{2}> <{3}> <{5}> <{10}> <{9}> ={4}= ={0}= ={8}= ={3}= ={7}= ={2}= ={6}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g) - > ./g [] 6:0-47 - > ./g [] 6:0-47 + [1] ./node_modules/x.js 20 bytes {0} {10} {11} {12} [built] + chunk {1} default/async-a~async-b~async-c.js (async-a~async-b~async-c) 20 bytes <{9}> ={0}= ={8}= ={3}= ={7}= ={2}= ={6}= ={5}= >{3}< >{4}< [rendered] split chunk (cache group: default) (name: async-a~async-b~async-c) > ./c [8] ./index.js 3:0-47 > ./b [8] ./index.js 2:0-47 - [2] ./f.js 20 bytes {1} {11} {12} [built] - chunk {2} default/async-a~async-b.js (async-a~async-b) 20 bytes <{9}> ={0}= ={1}= ={6}= ={3}= ={5}= >{1}< >{4}< [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b) + > ./a [8] ./index.js 1:0-47 + [0] ./d.js 20 bytes {1} {10} {11} {12} [built] + chunk {2} default/vendors~async-a~async-b.js (vendors~async-a~async-b) 20 bytes <{9}> ={0}= ={1}= ={6}= ={5}= >{3}< >{4}< [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b) > ./b [8] ./index.js 2:0-47 > ./a [8] ./index.js 1:0-47 [3] ./node_modules/y.js 20 bytes {2} {10} {11} [built] - chunk {3} default/async-a~async-b~async-c.js (async-a~async-b~async-c) 40 bytes <{9}> ={0}= ={8}= ={1}= ={7}= ={2}= ={5}= >{1}< >{4}< [rendered] split chunk (cache group: default) (name: async-a~async-b~async-c) + chunk {3} default/async-b~async-c~async-g.js (async-b~async-c~async-g) 20 bytes <{0}> <{2}> <{1}> <{5}> <{10}> <{9}> ={4}= ={0}= ={8}= ={1}= ={7}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g) + > ./g [] 6:0-47 + > ./g [] 6:0-47 > ./c [8] ./index.js 3:0-47 - > ./a [8] ./index.js 1:0-47 - [0] ./d.js 20 bytes {3} {6} {10} {11} {12} [built] - [1] ./node_modules/x.js 20 bytes {0} {3} {10} {11} {12} [built] - chunk {4} default/async-g.js (async-g) 34 bytes <{0}> <{2}> <{3}> <{5}> <{10}> ={1}= [rendered] + [2] ./f.js 20 bytes {3} {6} {11} {12} [built] + chunk {4} default/async-g.js (async-g) 34 bytes <{0}> <{2}> <{1}> <{5}> <{10}> ={3}= [rendered] > ./g [] 6:0-47 > ./g [] 6:0-47 [9] ./g.js 34 bytes {4} [built] - chunk {5} default/async-a.js (async-a) 156 bytes <{9}> ={0}= ={2}= ={3}= >{1}< >{4}< [rendered] + chunk {5} default/async-a.js (async-a) 156 bytes <{9}> ={0}= ={2}= ={1}= >{3}< >{4}< [rendered] > ./a [8] ./index.js 1:0-47 [7] ./a.js + 1 modules 156 bytes {5} {10} [built] | ./a.js 121 bytes [built] | ./e.js 20 bytes [built] chunk {6} default/async-b.js (async-b) 92 bytes <{9}> ={0}= ={2}= ={1}= [rendered] > ./b [8] ./index.js 2:0-47 - [0] ./d.js 20 bytes {3} {6} {10} {11} {12} [built] + [2] ./f.js 20 bytes {3} {6} {11} {12} [built] [5] ./b.js 72 bytes {6} {11} [built] chunk {7} default/async-c.js (async-c) 72 bytes <{9}> ={0}= ={8}= ={1}= ={3}= [rendered] > ./c [8] ./index.js 3:0-47 @@ -42,99 +41,98 @@ Child default: chunk {8} default/vendors~async-c.js (vendors~async-c) 20 bytes <{9}> ={0}= ={1}= ={3}= ={7}= [rendered] split chunk (cache group: vendors) (name: vendors~async-c) > ./c [8] ./index.js 3:0-47 [4] ./node_modules/z.js 20 bytes {8} {12} [built] - chunk {9} default/main.js (main) 147 bytes >{0}< >{2}< >{1}< >{6}< >{3}< >{5}< >{8}< >{7}< [entry] [rendered] + chunk {9} default/main.js (main) 147 bytes >{0}< >{2}< >{1}< >{5}< >{6}< >{8}< >{3}< >{7}< [entry] [rendered] > ./ main [8] ./index.js 147 bytes {9} [built] - chunk {10} default/a.js (a) 216 bytes >{1}< >{4}< [entry] [rendered] + chunk {10} default/a.js (a) 216 bytes >{3}< >{4}< [entry] [rendered] > ./a a - [0] ./d.js 20 bytes {3} {6} {10} {11} {12} [built] - [1] ./node_modules/x.js 20 bytes {0} {3} {10} {11} {12} [built] + [0] ./d.js 20 bytes {1} {10} {11} {12} [built] + [1] ./node_modules/x.js 20 bytes {0} {10} {11} {12} [built] [3] ./node_modules/y.js 20 bytes {2} {10} {11} [built] [7] ./a.js + 1 modules 156 bytes {5} {10} [built] | ./a.js 121 bytes [built] | ./e.js 20 bytes [built] chunk {11} default/b.js (b) 152 bytes [entry] [rendered] > ./b b - [0] ./d.js 20 bytes {3} {6} {10} {11} {12} [built] - [1] ./node_modules/x.js 20 bytes {0} {3} {10} {11} {12} [built] - [2] ./f.js 20 bytes {1} {11} {12} [built] + [0] ./d.js 20 bytes {1} {10} {11} {12} [built] + [1] ./node_modules/x.js 20 bytes {0} {10} {11} {12} [built] + [2] ./f.js 20 bytes {3} {6} {11} {12} [built] [3] ./node_modules/y.js 20 bytes {2} {10} {11} [built] [5] ./b.js 72 bytes {6} {11} [built] chunk {12} default/c.js (c) 152 bytes [entry] [rendered] > ./c c - [0] ./d.js 20 bytes {3} {6} {10} {11} {12} [built] - [1] ./node_modules/x.js 20 bytes {0} {3} {10} {11} {12} [built] - [2] ./f.js 20 bytes {1} {11} {12} [built] + [0] ./d.js 20 bytes {1} {10} {11} {12} [built] + [1] ./node_modules/x.js 20 bytes {0} {10} {11} {12} [built] + [2] ./f.js 20 bytes {3} {6} {11} {12} [built] [4] ./node_modules/z.js 20 bytes {8} {12} [built] [6] ./c.js 72 bytes {7} {12} [built] Child all-chunks: Entrypoint main = default/main.js - Entrypoint a = default/vendors~a~async-a~async-b~async-c~b~c.js default/a~async-a~async-b~b.js default/a.js - Entrypoint b = default/vendors~a~async-a~async-b~async-c~b~c.js default/a~async-a~async-b~b.js default/b.js + Entrypoint a = default/vendors~a~async-a~async-b~async-c~b~c.js default/vendors~a~async-a~async-b~b.js default/a.js + Entrypoint b = default/vendors~a~async-a~async-b~async-c~b~c.js default/vendors~a~async-a~async-b~b.js default/b.js Entrypoint c = default/vendors~a~async-a~async-b~async-c~b~c.js default/vendors~async-c~c.js default/c.js - chunk {0} default/vendors~a~async-a~async-b~async-c~b~c.js (vendors~a~async-a~async-b~async-c~b~c) 20 bytes <{9}> ={4}= ={12}= ={2}= ={11}= ={10}= ={1}= ={3}= ={8}= ={7}= ={6}= >{1}< >{5}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~async-c~b~c) + chunk {0} default/vendors~a~async-a~async-b~async-c~b~c.js (vendors~a~async-a~async-b~async-c~b~c) 20 bytes <{9}> ={4}= ={12}= ={2}= ={11}= ={10}= ={1}= ={3}= ={8}= ={7}= ={6}= >{3}< >{5}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~async-c~b~c) > ./c c > ./b b > ./a a > ./c [8] ./index.js 3:0-47 > ./b [8] ./index.js 2:0-47 > ./a [8] ./index.js 1:0-47 - [1] ./node_modules/x.js 20 bytes {0} {3} [built] - chunk {1} default/async-b~async-c~async-g~b~c.js (async-b~async-c~async-g~b~c) 20 bytes <{0}> <{2}> <{10}> <{3}> <{6}> <{9}> ={5}= ={0}= ={4}= ={3}= ={8}= ={2}= ={7}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g~b~c) - > ./g [] 6:0-47 - > ./g [] 6:0-47 + [2] ./node_modules/x.js 20 bytes {0} [built] + chunk {1} default/a~async-a~async-b~async-c~b~c.js (a~async-a~async-b~async-c~b~c) 20 bytes <{9}> ={0}= ={4}= ={3}= ={8}= ={2}= ={7}= ={6}= >{3}< >{5}< [rendered] split chunk (cache group: default) (name: a~async-a~async-b~async-c~b~c) > ./c [8] ./index.js 3:0-47 > ./b [8] ./index.js 2:0-47 - [2] ./f.js 20 bytes {1} {11} {12} [built] - chunk {2} default/a~async-a~async-b~b.js (a~async-a~async-b~b) 20 bytes <{9}> ={0}= ={11}= ={10}= ={1}= ={7}= ={3}= ={6}= >{1}< >{5}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~b) + > ./a [8] ./index.js 1:0-47 + [0] ./d.js 20 bytes {1} {10} {11} {12} [built] + chunk {2} default/vendors~a~async-a~async-b~b.js (vendors~a~async-a~async-b~b) 20 bytes <{9}> ={0}= ={11}= ={10}= ={1}= ={7}= ={6}= >{3}< >{5}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~b) > ./b b > ./a a > ./b [8] ./index.js 2:0-47 > ./a [8] ./index.js 1:0-47 [3] ./node_modules/y.js 20 bytes {2} [built] - chunk {3} default/a~async-a~async-b~async-c~b~c.js (a~async-a~async-b~async-c~b~c) 40 bytes <{9}> ={0}= ={4}= ={1}= ={8}= ={2}= ={6}= >{1}< >{5}< [rendered] split chunk (cache group: default) (name: a~async-a~async-b~async-c~b~c) + chunk {3} default/async-b~async-c~async-g~b~c.js (async-b~async-c~async-g~b~c) 20 bytes <{0}> <{2}> <{1}> <{6}> <{10}> <{9}> ={5}= ={0}= ={4}= ={1}= ={8}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g~b~c) + > ./g [] 6:0-47 + > ./g [] 6:0-47 > ./c [8] ./index.js 3:0-47 - > ./a [8] ./index.js 1:0-47 - [0] ./d.js 20 bytes {3} {7} {10} {11} {12} [built] - [1] ./node_modules/x.js 20 bytes {0} {3} [built] + [1] ./f.js 20 bytes {3} {7} {11} {12} [built] chunk {4} default/vendors~async-c~c.js (vendors~async-c~c) 20 bytes <{9}> ={0}= ={12}= ={1}= ={3}= ={8}= [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-c~c) > ./c c > ./c [8] ./index.js 3:0-47 [7] ./node_modules/z.js 20 bytes {4} [built] - chunk {5} default/async-g.js (async-g) 34 bytes <{0}> <{2}> <{10}> <{3}> <{6}> ={1}= [rendered] + chunk {5} default/async-g.js (async-g) 34 bytes <{0}> <{2}> <{1}> <{6}> <{10}> ={3}= [rendered] > ./g [] 6:0-47 > ./g [] 6:0-47 [9] ./g.js 34 bytes {5} [built] - chunk {6} default/async-a.js (async-a) 156 bytes <{9}> ={0}= ={2}= ={3}= >{1}< >{5}< [rendered] + chunk {6} default/async-a.js (async-a) 156 bytes <{9}> ={0}= ={2}= ={1}= >{3}< >{5}< [rendered] > ./a [8] ./index.js 1:0-47 [6] ./a.js + 1 modules 156 bytes {6} {10} [built] | ./a.js 121 bytes [built] | ./e.js 20 bytes [built] chunk {7} default/async-b.js (async-b) 92 bytes <{9}> ={0}= ={2}= ={1}= [rendered] > ./b [8] ./index.js 2:0-47 - [0] ./d.js 20 bytes {3} {7} {10} {11} {12} [built] + [1] ./f.js 20 bytes {3} {7} {11} {12} [built] [4] ./b.js 72 bytes {7} {11} [built] chunk {8} default/async-c.js (async-c) 72 bytes <{9}> ={0}= ={4}= ={1}= ={3}= [rendered] > ./c [8] ./index.js 3:0-47 [5] ./c.js 72 bytes {8} {12} [built] - chunk {9} default/main.js (main) 147 bytes >{0}< >{2}< >{1}< >{7}< >{3}< >{6}< >{4}< >{8}< [entry] [rendered] + chunk {9} default/main.js (main) 147 bytes >{0}< >{2}< >{1}< >{6}< >{7}< >{4}< >{3}< >{8}< [entry] [rendered] > ./ main [8] ./index.js 147 bytes {9} [built] - chunk {10} default/a.js (a) 176 bytes ={0}= ={2}= >{1}< >{5}< [entry] [rendered] + chunk {10} default/a.js (a) 176 bytes ={0}= ={2}= >{3}< >{5}< [entry] [rendered] > ./a a - [0] ./d.js 20 bytes {3} {7} {10} {11} {12} [built] + [0] ./d.js 20 bytes {1} {10} {11} {12} [built] [6] ./a.js + 1 modules 156 bytes {6} {10} [built] | ./a.js 121 bytes [built] | ./e.js 20 bytes [built] chunk {11} default/b.js (b) 112 bytes ={0}= ={2}= [entry] [rendered] > ./b b - [0] ./d.js 20 bytes {3} {7} {10} {11} {12} [built] - [2] ./f.js 20 bytes {1} {11} {12} [built] + [0] ./d.js 20 bytes {1} {10} {11} {12} [built] + [1] ./f.js 20 bytes {3} {7} {11} {12} [built] [4] ./b.js 72 bytes {7} {11} [built] chunk {12} default/c.js (c) 112 bytes ={0}= ={4}= [entry] [rendered] > ./c c - [0] ./d.js 20 bytes {3} {7} {10} {11} {12} [built] - [2] ./f.js 20 bytes {1} {11} {12} [built] + [0] ./d.js 20 bytes {1} {10} {11} {12} [built] + [1] ./f.js 20 bytes {3} {7} {11} {12} [built] [5] ./c.js 72 bytes {8} {12} [built] Child manual: Entrypoint main = default/main.js @@ -194,70 +192,69 @@ Child manual: [5] ./c.js 72 bytes {4} {8} [built] Child name-too-long: Entrypoint main = main.js - Entrypoint aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa = vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~716093be.js aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.js aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.js - Entrypoint bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb = vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~716093be.js aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.js bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.js + Entrypoint aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa = vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~716093be.js vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.js aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.js + Entrypoint bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb = vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~716093be.js vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.js bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.js Entrypoint cccccccccccccccccccccccccccccc = vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~716093be.js vendors~async-c~cccccccccccccccccccccccccccccc.js cccccccccccccccccccccccccccccc.js - chunk {0} vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~716093be.js (vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~716093be) 20 bytes <{9}> ={4}= ={12}= ={2}= ={11}= ={10}= ={1}= ={3}= ={8}= ={7}= ={6}= >{1}< >{5}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~716093be) + chunk {0} vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~716093be.js (vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~716093be) 20 bytes <{9}> ={4}= ={12}= ={2}= ={11}= ={10}= ={1}= ={3}= ={8}= ={7}= ={6}= >{3}< >{5}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~716093be) > ./c cccccccccccccccccccccccccccccc > ./b bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb > ./a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa > ./c [8] ./index.js 3:0-47 > ./b [8] ./index.js 2:0-47 > ./a [8] ./index.js 1:0-47 - [1] ./node_modules/x.js 20 bytes {0} {3} [built] - chunk {1} async-b~async-c~async-g~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccccccccccccccccccc.js (async-b~async-c~async-g~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccccccccccccccccccc) 20 bytes <{0}> <{2}> <{10}> <{3}> <{6}> <{9}> ={5}= ={0}= ={4}= ={3}= ={8}= ={2}= ={7}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccccccccccccccccccc) - > ./g [] 6:0-47 - > ./g [] 6:0-47 + [2] ./node_modules/x.js 20 bytes {0} [built] + chunk {1} aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccc~e7d53185.js (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccc~e7d53185) 20 bytes <{9}> ={0}= ={4}= ={3}= ={8}= ={2}= ={7}= ={6}= >{3}< >{5}< [rendered] split chunk (cache group: default) (name: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccc~e7d53185) > ./c [8] ./index.js 3:0-47 > ./b [8] ./index.js 2:0-47 - [2] ./f.js 20 bytes {1} {11} {12} [built] - chunk {2} aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.js (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb) 20 bytes <{9}> ={0}= ={11}= ={10}= ={1}= ={7}= ={3}= ={6}= >{1}< >{5}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb) + > ./a [8] ./index.js 1:0-47 + [0] ./d.js 20 bytes {1} {10} {11} {12} [built] + chunk {2} vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.js (vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb) 20 bytes <{9}> ={0}= ={11}= ={10}= ={1}= ={7}= ={6}= >{3}< >{5}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb) > ./b bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb > ./a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa > ./b [8] ./index.js 2:0-47 > ./a [8] ./index.js 1:0-47 [3] ./node_modules/y.js 20 bytes {2} [built] - chunk {3} aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccc~e7d53185.js (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccc~e7d53185) 40 bytes <{9}> ={0}= ={4}= ={1}= ={8}= ={2}= ={6}= >{1}< >{5}< [rendered] split chunk (cache group: default) (name: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccc~e7d53185) + chunk {3} async-b~async-c~async-g~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccccccccccccccccccc.js (async-b~async-c~async-g~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccccccccccccccccccc) 20 bytes <{0}> <{2}> <{1}> <{6}> <{10}> <{9}> ={5}= ={0}= ={4}= ={1}= ={8}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccccccccccccccccccc) + > ./g [] 6:0-47 + > ./g [] 6:0-47 > ./c [8] ./index.js 3:0-47 - > ./a [8] ./index.js 1:0-47 - [0] ./d.js 20 bytes {3} {7} {10} {11} {12} [built] - [1] ./node_modules/x.js 20 bytes {0} {3} [built] + [1] ./f.js 20 bytes {3} {7} {11} {12} [built] chunk {4} vendors~async-c~cccccccccccccccccccccccccccccc.js (vendors~async-c~cccccccccccccccccccccccccccccc) 20 bytes <{9}> ={0}= ={12}= ={1}= ={3}= ={8}= [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-c~cccccccccccccccccccccccccccccc) > ./c cccccccccccccccccccccccccccccc > ./c [8] ./index.js 3:0-47 [7] ./node_modules/z.js 20 bytes {4} [built] - chunk {5} async-g.js (async-g) 34 bytes <{0}> <{2}> <{10}> <{3}> <{6}> ={1}= [rendered] + chunk {5} async-g.js (async-g) 34 bytes <{0}> <{2}> <{1}> <{6}> <{10}> ={3}= [rendered] > ./g [] 6:0-47 > ./g [] 6:0-47 [9] ./g.js 34 bytes {5} [built] - chunk {6} async-a.js (async-a) 156 bytes <{9}> ={0}= ={2}= ={3}= >{1}< >{5}< [rendered] + chunk {6} async-a.js (async-a) 156 bytes <{9}> ={0}= ={2}= ={1}= >{3}< >{5}< [rendered] > ./a [8] ./index.js 1:0-47 [6] ./a.js + 1 modules 156 bytes {6} {10} [built] | ./a.js 121 bytes [built] | ./e.js 20 bytes [built] chunk {7} async-b.js (async-b) 92 bytes <{9}> ={0}= ={2}= ={1}= [rendered] > ./b [8] ./index.js 2:0-47 - [0] ./d.js 20 bytes {3} {7} {10} {11} {12} [built] + [1] ./f.js 20 bytes {3} {7} {11} {12} [built] [4] ./b.js 72 bytes {7} {11} [built] chunk {8} async-c.js (async-c) 72 bytes <{9}> ={0}= ={4}= ={1}= ={3}= [rendered] > ./c [8] ./index.js 3:0-47 [5] ./c.js 72 bytes {8} {12} [built] - chunk {9} main.js (main) 147 bytes >{0}< >{2}< >{1}< >{7}< >{3}< >{6}< >{4}< >{8}< [entry] [rendered] + chunk {9} main.js (main) 147 bytes >{0}< >{2}< >{1}< >{6}< >{7}< >{4}< >{3}< >{8}< [entry] [rendered] > ./ main [8] ./index.js 147 bytes {9} [built] - chunk {10} aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.js (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) 176 bytes ={0}= ={2}= >{1}< >{5}< [entry] [rendered] + chunk {10} aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.js (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) 176 bytes ={0}= ={2}= >{3}< >{5}< [entry] [rendered] > ./a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - [0] ./d.js 20 bytes {3} {7} {10} {11} {12} [built] + [0] ./d.js 20 bytes {1} {10} {11} {12} [built] [6] ./a.js + 1 modules 156 bytes {6} {10} [built] | ./a.js 121 bytes [built] | ./e.js 20 bytes [built] chunk {11} bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.js (bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb) 112 bytes ={0}= ={2}= [entry] [rendered] > ./b bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb - [0] ./d.js 20 bytes {3} {7} {10} {11} {12} [built] - [2] ./f.js 20 bytes {1} {11} {12} [built] + [0] ./d.js 20 bytes {1} {10} {11} {12} [built] + [1] ./f.js 20 bytes {3} {7} {11} {12} [built] [4] ./b.js 72 bytes {7} {11} [built] chunk {12} cccccccccccccccccccccccccccccc.js (cccccccccccccccccccccccccccccc) 112 bytes ={0}= ={4}= [entry] [rendered] > ./c cccccccccccccccccccccccccccccc - [0] ./d.js 20 bytes {3} {7} {10} {11} {12} [built] - [2] ./f.js 20 bytes {1} {11} {12} [built] + [0] ./d.js 20 bytes {1} {10} {11} {12} [built] + [1] ./f.js 20 bytes {3} {7} {11} {12} [built] [5] ./c.js 72 bytes {8} {12} [built] \ No newline at end of file From 425a961bb6978ba9623eb2ffbb79198e6c2c969b Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Tue, 6 Feb 2018 21:50:23 +0100 Subject: [PATCH 055/112] allow name: false for splitChunks #6426 --- schemas/WebpackOptions.json | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/schemas/WebpackOptions.json b/schemas/WebpackOptions.json index 4326589af..2f605f84e 100644 --- a/schemas/WebpackOptions.json +++ b/schemas/WebpackOptions.json @@ -1367,9 +1367,7 @@ "description": "Give chunks created a name (chunks with equal name are merged)", "oneOf": [ { - "enum": [ - true - ] + "type": "boolean" }, { "instanceof": "Function" @@ -1461,9 +1459,7 @@ "description": "Give chunks for this cache group a name (chunks with equal name are merged)", "oneOf": [ { - "enum": [ - true - ] + "type": "boolean" }, { "instanceof": "Function" From 490a32cfea2ab88dd0d46b1dcd2d09cf4ee49f43 Mon Sep 17 00:00:00 2001 From: Florent Cailhol Date: Wed, 7 Feb 2018 10:39:06 +0100 Subject: [PATCH 056/112] Update parser to support EcmaScript 2018 --- lib/Parser.js | 8 ++++++-- test/Parser.unittest.js | 22 +++++++++++++++++++--- yarn.lock | 6 +++++- 3 files changed, 30 insertions(+), 6 deletions(-) diff --git a/lib/Parser.js b/lib/Parser.js index 09f6844c5..5bda48f2e 100644 --- a/lib/Parser.js +++ b/lib/Parser.js @@ -24,7 +24,7 @@ const joinRanges = (startRange, endRange) => { const defaultParserOptions = { ranges: true, locations: true, - ecmaVersion: 2017, + ecmaVersion: 2018, sourceType: "module", onComment: null, plugins: { @@ -1297,6 +1297,10 @@ class Parser extends Tapable { walkObjectExpression(expression) { for(let propIndex = 0, len = expression.properties.length; propIndex < len; propIndex++) { const prop = expression.properties[propIndex]; + if(prop.type === "SpreadElement") { + this.walkExpression(prop.argument); + continue; + } if(prop.computed) this.walkExpression(prop.key); if(prop.shorthand) @@ -1856,7 +1860,7 @@ class Parser extends Tapable { } static parse(code, options) { - const type = options.sourceType; + const type = options ? options.sourceType : "module"; const parserOptions = Object.assign(Object.create(null), defaultParserOptions, options); if(type === "auto") { diff --git a/test/Parser.unittest.js b/test/Parser.unittest.js index 34bab80b1..15d3a1225 100644 --- a/test/Parser.unittest.js +++ b/test/Parser.unittest.js @@ -468,13 +468,13 @@ describe("Parser", () => { const cases = { "async function": "async function x() {}", "async arrow function": "async () => {}", - "await expression": "async function x(y) { await y }" + "await expression": "async function x(y) { await y }", + "await iteration": "async function f() { for await (x of xs); }" }; - const parser = new Parser(); Object.keys(cases).forEach((name) => { const expr = cases[name]; it(name, () => { - const actual = parser.parse(expr); + const actual = Parser.parse(expr); should.strictEqual(typeof actual, "object"); }); }); @@ -511,4 +511,20 @@ describe("Parser", () => { }); }); }); + + describe("object rest/spread support", () => { + describe("should accept", () => { + const cases = { + "object spread": "({...obj})", + "object rest": "({...obj} = foo)" + }; + Object.keys(cases).forEach((name) => { + const expr = cases[name]; + it(name, () => { + const actual = Parser.parse(expr); + should.strictEqual(typeof actual, "object"); + }); + }); + }); + }); }); diff --git a/yarn.lock b/yarn.lock index 555ea00d5..081b2aea2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -47,7 +47,11 @@ acorn@^3.0.4: version "3.3.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" -acorn@^5.0.0, acorn@^5.2.1: +acorn@^5.0.0: + version "5.4.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.4.1.tgz#fdc58d9d17f4a4e98d102ded826a9b9759125102" + +acorn@^5.2.1: version "5.3.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.3.0.tgz#7446d39459c54fb49a80e6ee6478149b940ec822" From f072fd2978a2e02f453aa7853953f11dcb94c079 Mon Sep 17 00:00:00 2001 From: Florent Cailhol Date: Wed, 7 Feb 2018 10:44:15 +0100 Subject: [PATCH 057/112] Set Hot test cases timeout to 5s --- test/HotTestCases.test.js | 1 + 1 file changed, 1 insertion(+) diff --git a/test/HotTestCases.test.js b/test/HotTestCases.test.js index 031ea58ee..df2a8d398 100644 --- a/test/HotTestCases.test.js +++ b/test/HotTestCases.test.js @@ -72,6 +72,7 @@ describe("HotTestCases", () => { function _it(title, fn) { const test = new Test(title, fn); + test.timeout(5000); suite.addTest(test); exportedTests++; return test; From 80d2e22684383009069d3e8d88d2b592b3b57582 Mon Sep 17 00:00:00 2001 From: Mihail Bodrov Date: Thu, 8 Feb 2018 01:11:21 +0300 Subject: [PATCH 058/112] Simplify for loop in EntryPoint.getFiles --- lib/Entrypoint.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Entrypoint.js b/lib/Entrypoint.js index 5bd8fdf63..a6835557e 100644 --- a/lib/Entrypoint.js +++ b/lib/Entrypoint.js @@ -19,9 +19,9 @@ class Entrypoint extends ChunkGroup { getFiles() { const files = new Set(); - for(let chunkIdx = 0; chunkIdx < this.chunks.length; chunkIdx++) { - for(let fileIdx = 0; fileIdx < this.chunks[chunkIdx].files.length; fileIdx++) { - files.add(this.chunks[chunkIdx].files[fileIdx]); + for(const chunk of this.chunks) { + for(const file of chunk) { + files.add(file); } } From b84ac5bc1132dd286ec208d2bc260121310b5d06 Mon Sep 17 00:00:00 2001 From: Mihail Bodrov Date: Thu, 8 Feb 2018 02:28:08 +0300 Subject: [PATCH 059/112] Fix typo --- lib/Entrypoint.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Entrypoint.js b/lib/Entrypoint.js index a6835557e..440d67c47 100644 --- a/lib/Entrypoint.js +++ b/lib/Entrypoint.js @@ -20,7 +20,7 @@ class Entrypoint extends ChunkGroup { const files = new Set(); for(const chunk of this.chunks) { - for(const file of chunk) { + for(const file of chunk.files) { files.add(file); } } From 59d9b9f8aaedefb2ba725c3dd88407ddc41c4aa7 Mon Sep 17 00:00:00 2001 From: Stephan Badragan Date: Wed, 7 Feb 2018 22:34:30 +0000 Subject: [PATCH 060/112] EvalSourceMapDevToolPlugin: add ability to filter which modules get sourcemapped see: https://github.com/webpack/webpack/issues/6450 This is useful to filter out stuff you don't care about or stuff that's very large and screws up with devtools. --- ...valSourceMapDevToolModuleTemplatePlugin.js | 5 +++++ .../exclude-modules-source-map/index.js | 8 +++++++ .../exclude-modules-source-map/test1.js | 3 +++ .../exclude-modules-source-map/test2.js | 3 +++ .../webpack.config.js | 22 +++++++++++++++++++ 5 files changed, 41 insertions(+) create mode 100644 test/configCases/source-map/exclude-modules-source-map/index.js create mode 100644 test/configCases/source-map/exclude-modules-source-map/test1.js create mode 100644 test/configCases/source-map/exclude-modules-source-map/test2.js create mode 100644 test/configCases/source-map/exclude-modules-source-map/webpack.config.js diff --git a/lib/EvalSourceMapDevToolModuleTemplatePlugin.js b/lib/EvalSourceMapDevToolModuleTemplatePlugin.js index f501045b4..25d9bb897 100644 --- a/lib/EvalSourceMapDevToolModuleTemplatePlugin.js +++ b/lib/EvalSourceMapDevToolModuleTemplatePlugin.js @@ -19,9 +19,14 @@ class EvalSourceMapDevToolModuleTemplatePlugin { apply(moduleTemplate) { const self = this; const options = this.options; + const matchModule = ModuleFilenameHelpers.matchObject.bind(ModuleFilenameHelpers, options); moduleTemplate.hooks.module.tap("EvalSourceMapDevToolModuleTemplatePlugin", (source, module) => { if(source.__EvalSourceMapDevToolData) return source.__EvalSourceMapDevToolData; + if(!matchModule(module.resource)) { + return source; + } + let sourceMap; let content; if(source.sourceAndMap) { diff --git a/test/configCases/source-map/exclude-modules-source-map/index.js b/test/configCases/source-map/exclude-modules-source-map/index.js new file mode 100644 index 000000000..942871944 --- /dev/null +++ b/test/configCases/source-map/exclude-modules-source-map/index.js @@ -0,0 +1,8 @@ +it("bundle1 should include eval sourcemapped test1.js and test2.js as is", function() { + var fs = require("fs"); + var path = require("path"); + var bundle1 = fs.readFileSync(path.join(__dirname, "bundle1.js"), "utf-8"); + bundle1.should.containEql("eval(\"var test1marker"); + bundle1.should.containEql("var test2marker"); + bundle1.should.not.containEql("eval(\"var test2marker"); +}); diff --git a/test/configCases/source-map/exclude-modules-source-map/test1.js b/test/configCases/source-map/exclude-modules-source-map/test1.js new file mode 100644 index 000000000..887141b0f --- /dev/null +++ b/test/configCases/source-map/exclude-modules-source-map/test1.js @@ -0,0 +1,3 @@ +var test1marker = {}; + +module.exports = test1marker; diff --git a/test/configCases/source-map/exclude-modules-source-map/test2.js b/test/configCases/source-map/exclude-modules-source-map/test2.js new file mode 100644 index 000000000..f419d3ae1 --- /dev/null +++ b/test/configCases/source-map/exclude-modules-source-map/test2.js @@ -0,0 +1,3 @@ +var test2marker = {}; + +module.exports = test2marker; diff --git a/test/configCases/source-map/exclude-modules-source-map/webpack.config.js b/test/configCases/source-map/exclude-modules-source-map/webpack.config.js new file mode 100644 index 000000000..028743e5c --- /dev/null +++ b/test/configCases/source-map/exclude-modules-source-map/webpack.config.js @@ -0,0 +1,22 @@ +var webpack = require("../../../../"); +module.exports = { + node: { + __dirname: false, + __filename: false + }, + entry: { + bundle0: ["./index.js"], + bundle1: ["./test1.js", "./test2.js"] + }, + output: { + filename: "[name].js" + }, + plugins: [ + new webpack.EvalSourceMapDevToolPlugin({ + include: /\.js$/, + exclude: /test2\.js/, + module: true, + columns: false + }) + ] +}; From dcde5f4bd1e6d6b58bd4cb88c1a64c8f3efced0c Mon Sep 17 00:00:00 2001 From: Alex Nozdriukhin Date: Fri, 9 Feb 2018 19:25:22 +0900 Subject: [PATCH 061/112] Fix typos --- lib/wasm/WasmModuleTemplatePlugin.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/wasm/WasmModuleTemplatePlugin.js b/lib/wasm/WasmModuleTemplatePlugin.js index 88800ccbf..96ecfa2b6 100644 --- a/lib/wasm/WasmModuleTemplatePlugin.js +++ b/lib/wasm/WasmModuleTemplatePlugin.js @@ -14,7 +14,7 @@ class WasmModuleTemplatePlugin { }) => { if(module.type && module.type.startsWith("webassembly")) { if(chunk.canBeInitial()) - throw new Error("Sync WebAsssmbly compilation is not yet implemented"); + throw new Error("Sync WebAssembly compilation is not yet implemented"); const generateExports = () => { if(Array.isArray(module.buildMeta.providedExports) && Array.isArray(module.usedExports)) { // generate mangled exports @@ -62,11 +62,11 @@ class WasmModuleTemplatePlugin { const source = new RawSource([ "\"use strict\";", "", - "// Instanciate WebAssembly module", + "// Instantiate WebAssembly module", "var instance = new WebAssembly.Instance(__webpack_require__.w[module.i], {" + generateImports(), "});", "", - "// export exports from WebAssmbly module", + "// export exports from WebAssembly module", // TODO rewrite this to getters depending on exports to support circular dependencies generateExports() ].join("\n")); From 08f5ad9fb44d224cb1f0626ea83f41e2424c2e8f Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Fri, 9 Feb 2018 16:48:39 +0100 Subject: [PATCH 062/112] Revert "Wrap default entry property in array" --- lib/WebpackOptionsDefaulter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/WebpackOptionsDefaulter.js b/lib/WebpackOptionsDefaulter.js index 2081482f4..d2c041216 100644 --- a/lib/WebpackOptionsDefaulter.js +++ b/lib/WebpackOptionsDefaulter.js @@ -17,7 +17,7 @@ class WebpackOptionsDefaulter extends OptionsDefaulter { constructor() { super(); - this.set("entry", ["./src"]); + this.set("entry", "./src"); this.set("devtool", "make", options => (options.mode === "development" ? "eval" : false)); this.set("cache", "make", options => options.mode === "development"); From 4d77f847db9bb8e9cae78c57682e416b22ffbe80 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Fri, 9 Feb 2018 17:35:28 +0100 Subject: [PATCH 063/112] fix a crash with buildMeta of null --- lib/RuntimeTemplate.js | 4 ++++ lib/dependencies/HarmonyImportSpecifierDependency.js | 1 + test/cases/errors/crash-missing-import/a.js | 3 +++ test/cases/errors/crash-missing-import/errors.js | 3 +++ test/cases/errors/crash-missing-import/index.js | 4 ++++ 5 files changed, 15 insertions(+) create mode 100644 test/cases/errors/crash-missing-import/a.js create mode 100644 test/cases/errors/crash-missing-import/errors.js create mode 100644 test/cases/errors/crash-missing-import/index.js diff --git a/lib/RuntimeTemplate.js b/lib/RuntimeTemplate.js index 72f833337..ac761bf9a 100644 --- a/lib/RuntimeTemplate.js +++ b/lib/RuntimeTemplate.js @@ -192,6 +192,7 @@ module.exports = class RuntimeTemplate { exportFromImport({ module, + request, exportName, originModule, asiSafe, @@ -199,6 +200,9 @@ module.exports = class RuntimeTemplate { callContext, importVar }) { + if(!module) return this.missingModule({ + request + }); const exportsType = module.buildMeta && module.buildMeta.exportsType; if(!exportsType) { diff --git a/lib/dependencies/HarmonyImportSpecifierDependency.js b/lib/dependencies/HarmonyImportSpecifierDependency.js index be4b0473e..6760bc58d 100644 --- a/lib/dependencies/HarmonyImportSpecifierDependency.js +++ b/lib/dependencies/HarmonyImportSpecifierDependency.js @@ -104,6 +104,7 @@ HarmonyImportSpecifierDependency.Template = class HarmonyImportSpecifierDependen getContent(dep, runtime) { const exportExpr = runtime.exportFromImport({ module: dep.module, + request: dep.request, exportName: dep.id, originModule: dep.originModule, asiSafe: dep.shorthand, diff --git a/test/cases/errors/crash-missing-import/a.js b/test/cases/errors/crash-missing-import/a.js new file mode 100644 index 000000000..bc0051d92 --- /dev/null +++ b/test/cases/errors/crash-missing-import/a.js @@ -0,0 +1,3 @@ +import { x } from "./missing"; + +x(); diff --git a/test/cases/errors/crash-missing-import/errors.js b/test/cases/errors/crash-missing-import/errors.js new file mode 100644 index 000000000..4eefda428 --- /dev/null +++ b/test/cases/errors/crash-missing-import/errors.js @@ -0,0 +1,3 @@ +module.exports = [ + [/Module not found/], +]; diff --git a/test/cases/errors/crash-missing-import/index.js b/test/cases/errors/crash-missing-import/index.js new file mode 100644 index 000000000..55c9b56c6 --- /dev/null +++ b/test/cases/errors/crash-missing-import/index.js @@ -0,0 +1,4 @@ +it("should not crash when imported module is missing", function() { +}); + +require.include("./a"); From 85ff5507a56dbb8b9956659499f646869eeeac51 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Fri, 9 Feb 2018 18:01:31 +0100 Subject: [PATCH 064/112] fixes #6459 --- lib/WebpackOptionsDefaulter.js | 7 +++++-- test/cases/mjs/no-module-main-field/index.mjs | 5 +++++ test/cases/mjs/no-module-main-field/node_modules/m/a.js | 1 + test/cases/mjs/no-module-main-field/node_modules/m/a.mjs | 1 + test/cases/mjs/no-module-main-field/node_modules/m/b.js | 1 + test/cases/mjs/no-module-main-field/node_modules/m/b.mjs | 1 + .../mjs/no-module-main-field/node_modules/m/package.json | 4 ++++ 7 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 test/cases/mjs/no-module-main-field/index.mjs create mode 100644 test/cases/mjs/no-module-main-field/node_modules/m/a.js create mode 100644 test/cases/mjs/no-module-main-field/node_modules/m/a.mjs create mode 100644 test/cases/mjs/no-module-main-field/node_modules/m/b.js create mode 100644 test/cases/mjs/no-module-main-field/node_modules/m/b.mjs create mode 100644 test/cases/mjs/no-module-main-field/node_modules/m/package.json diff --git a/lib/WebpackOptionsDefaulter.js b/lib/WebpackOptionsDefaulter.js index 2081482f4..226e87a13 100644 --- a/lib/WebpackOptionsDefaulter.js +++ b/lib/WebpackOptionsDefaulter.js @@ -41,13 +41,16 @@ class WebpackOptionsDefaulter extends OptionsDefaulter { this.set("module.strictThisContextOnImports", false); this.set("module.unsafeCache", "make", options => !!options.cache); this.set("module.rules", []); - this.set("module.defaultRules", [{ + this.set("module.defaultRules", "make", options => [{ type: "javascript/auto", resolve: {} }, { test: /\.mjs$/i, - type: "javascript/esm" + type: "javascript/esm", + resolve: { + mainFields: options.target === "web" || options.target === "webworker" ? ["browser", "main"] : ["main"] + } }, { test: /\.json$/i, diff --git a/test/cases/mjs/no-module-main-field/index.mjs b/test/cases/mjs/no-module-main-field/index.mjs new file mode 100644 index 000000000..0870957cc --- /dev/null +++ b/test/cases/mjs/no-module-main-field/index.mjs @@ -0,0 +1,5 @@ +import result from "m"; + +it("should use the correct entry point", function() { + result.should.be.eql("yep"); +}); diff --git a/test/cases/mjs/no-module-main-field/node_modules/m/a.js b/test/cases/mjs/no-module-main-field/node_modules/m/a.js new file mode 100644 index 000000000..edbdf0bde --- /dev/null +++ b/test/cases/mjs/no-module-main-field/node_modules/m/a.js @@ -0,0 +1 @@ +export default "nope1"; diff --git a/test/cases/mjs/no-module-main-field/node_modules/m/a.mjs b/test/cases/mjs/no-module-main-field/node_modules/m/a.mjs new file mode 100644 index 000000000..b43605e39 --- /dev/null +++ b/test/cases/mjs/no-module-main-field/node_modules/m/a.mjs @@ -0,0 +1 @@ +export default "yep"; diff --git a/test/cases/mjs/no-module-main-field/node_modules/m/b.js b/test/cases/mjs/no-module-main-field/node_modules/m/b.js new file mode 100644 index 000000000..546bdcec4 --- /dev/null +++ b/test/cases/mjs/no-module-main-field/node_modules/m/b.js @@ -0,0 +1 @@ +export default "nope2"; diff --git a/test/cases/mjs/no-module-main-field/node_modules/m/b.mjs b/test/cases/mjs/no-module-main-field/node_modules/m/b.mjs new file mode 100644 index 000000000..9e4044b48 --- /dev/null +++ b/test/cases/mjs/no-module-main-field/node_modules/m/b.mjs @@ -0,0 +1 @@ +export default "nope3"; diff --git a/test/cases/mjs/no-module-main-field/node_modules/m/package.json b/test/cases/mjs/no-module-main-field/node_modules/m/package.json new file mode 100644 index 000000000..8fc09d62d --- /dev/null +++ b/test/cases/mjs/no-module-main-field/node_modules/m/package.json @@ -0,0 +1,4 @@ +{ + "main": "a", + "module": "b" +} From be18ad1a1d16856f6a1c6a01b5183d9292340a74 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Sat, 10 Feb 2018 14:52:13 +0100 Subject: [PATCH 065/112] fix test case watch test cases are not executed by CI --- test/watchCases/runtime/static-import/0/index.js | 2 +- test/watchCases/runtime/static-import/test.config.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/watchCases/runtime/static-import/0/index.js b/test/watchCases/runtime/static-import/0/index.js index 4d669f09e..da9c2eeea 100644 --- a/test/watchCases/runtime/static-import/0/index.js +++ b/test/watchCases/runtime/static-import/0/index.js @@ -4,7 +4,7 @@ import * as both from './dynamic-and-static' import * as staticModule from './static' it("should not change chunkhash of manifest chunk", function () { - const manifestChunk = STATS_JSON.chunks.find((chunk) => chunk.names.indexOf("main-runtime") !== -1); + const manifestChunk = STATS_JSON.chunks.find((chunk) => chunk.names.indexOf("runtime~main") !== -1); (!manifestChunk).should.be.false("Main chunk not found"); switch (WATCH_STEP) { case "0": diff --git a/test/watchCases/runtime/static-import/test.config.js b/test/watchCases/runtime/static-import/test.config.js index 43b6b415f..3d9533c73 100644 --- a/test/watchCases/runtime/static-import/test.config.js +++ b/test/watchCases/runtime/static-import/test.config.js @@ -1,6 +1,6 @@ module.exports = { bundlePath: [ - "./main-runtime.js", + "./runtime~main.js", "./main.js" ] }; From 6f1b6d9d98c93fe8e8123241ece09fc5294da1c2 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Sat, 10 Feb 2018 15:04:45 +0100 Subject: [PATCH 066/112] fix chunkhash example --- examples/chunkhash/example.js | 1 - examples/chunkhash/template.md | 17 ++++------------- examples/chunkhash/vendor.js | 2 -- 3 files changed, 4 insertions(+), 16 deletions(-) delete mode 100644 examples/chunkhash/vendor.js diff --git a/examples/chunkhash/example.js b/examples/chunkhash/example.js index 5588ac501..284869d08 100644 --- a/examples/chunkhash/example.js +++ b/examples/chunkhash/example.js @@ -1,4 +1,3 @@ -import vendor from "./vendor"; // some module import("./async1"); import("./async2"); diff --git a/examples/chunkhash/template.md b/examples/chunkhash/template.md index 907bcc3c4..b7df1a727 100644 --- a/examples/chunkhash/template.md +++ b/examples/chunkhash/template.md @@ -13,12 +13,6 @@ The configuration required for this is: {{example.js}} ``` -# vendor.js - -``` javascript -{{vendor.js}} -``` - # webpack.config.js ``` javascript @@ -33,24 +27,21 @@ The configuration required for this is: - + - - - ``` -# dist/main-runtime.[chunkhash].js +# dist/runtime~main.[chunkhash].js ``` javascript -{{dist/main-runtime.chunkhash.js}} +{{dist/runtime~main.chunkhash.js}} ``` # dist/main.[chunkhash].js diff --git a/examples/chunkhash/vendor.js b/examples/chunkhash/vendor.js deleted file mode 100644 index ac0104f5f..000000000 --- a/examples/chunkhash/vendor.js +++ /dev/null @@ -1,2 +0,0 @@ -// some vendor lib (should be in common chunk) -export default 123; From 0b566508fb5992d56db544e82765b8cebe1dd1fb Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Sat, 10 Feb 2018 15:09:34 +0100 Subject: [PATCH 067/112] hide buildAt in examples --- examples/template-common.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/template-common.js b/examples/template-common.js index a8ad3de36..b67dbfce2 100644 --- a/examples/template-common.js +++ b/examples/template-common.js @@ -15,6 +15,7 @@ function lessStrict(regExpStr) { const runtimeRegexp = /(```\s*(?:js|javascript)\n)?(.*)(\/\*\*\*\*\*\*\/ \(function\(modules\) \{ \/\/ webpackBootstrap\n(?:.|\n)*?\n\/\*\*\*\*\*\*\/ \}\)\n\/\**\/\n)/; const timeRegexp = /\s*Time: \d+ms/g; +const buildAtRegexp = /\s*Built at: .+/mg; const hashRegexp = /Hash: [a-f0-9]+/g; exports.replaceBase = (template) => { @@ -36,6 +37,7 @@ exports.replaceBase = (template) => { .replace(webpack, "(webpack)") .replace(webpackParent, "(webpack)/~") .replace(timeRegexp, "") + .replace(buildAtRegexp, "") .replace(hashRegexp, "Hash: 0a1b2c3d4e5f6a7b8c9d") .replace(/\.chunkhash\./g, ".[chunkhash].") .replace(runtimeRegexp, function(match) { From d518b36de72aa1b6f083f57960f38c26f116b535 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Sat, 10 Feb 2018 15:09:46 +0100 Subject: [PATCH 068/112] update examples --- examples/chunkhash/README.md | 99 +++++++++--------------------- examples/source-map/README.md | 106 ++++++++++++++++----------------- examples/wasm-simple/README.md | 18 +++--- 3 files changed, 91 insertions(+), 132 deletions(-) diff --git a/examples/chunkhash/README.md b/examples/chunkhash/README.md index c60ffbdc3..079310019 100644 --- a/examples/chunkhash/README.md +++ b/examples/chunkhash/README.md @@ -10,19 +10,11 @@ The configuration required for this is: # example.js ``` javascript -import vendor from "./vendor"; // some module import("./async1"); import("./async2"); ``` -# vendor.js - -``` javascript -// some vendor lib (should be in common chunk) -export default 123; -``` - # webpack.config.js ``` javascript @@ -51,21 +43,18 @@ module.exports = { - + - - - ``` -# dist/main-runtime.[chunkhash].js +# dist/runtime~main.[chunkhash].js
/******/ (function(modules) { /* webpackBootstrap */ }) @@ -280,30 +269,12 @@ module.exports = { /*!********************!*\ !*** ./example.js ***! \********************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _vendor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./vendor */ 1); +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { // some module -__webpack_require__.e(/*! import() */ 1).then(function() { var module = __webpack_require__(/*! ./async1 */ 2); return typeof module === "object" && module && module.__esModule ? module : { /* fake namespace object */ "default": module }; }); -__webpack_require__.e(/*! import() */ 2).then(function() { var module = __webpack_require__(/*! ./async2 */ 3); return typeof module === "object" && module && module.__esModule ? module : { /* fake namespace object */ "default": module }; }); - - -/***/ }), -/* 1 */ -/*!*******************!*\ - !*** ./vendor.js ***! - \*******************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -// some vendor lib (should be in common chunk) -/* harmony default export */ __webpack_exports__["default"] = (123); +__webpack_require__.e(/*! import() */ 1).then(function() { var module = __webpack_require__(/*! ./async1 */ 1); return typeof module === "object" && module && module.__esModule ? module : { /* fake namespace object */ "default": module }; }); +__webpack_require__.e(/*! import() */ 2).then(function() { var module = __webpack_require__(/*! ./async2 */ 2); return typeof module === "object" && module && module.__esModule ? module : { /* fake namespace object */ "default": module }; }); /***/ }) @@ -318,28 +289,24 @@ __webpack_require__.r(__webpack_exports__); Hash: 0a1b2c3d4e5f6a7b8c9d Version: webpack next Asset Size Chunks Chunk Names - main.[chunkhash].js 1.28 KiB 0 [emitted] main - 1.[chunkhash].js 264 bytes 1 [emitted] + main.[chunkhash].js 768 bytes 0 [emitted] main + 1.[chunkhash].js 270 bytes 1 [emitted] 2.[chunkhash].js 264 bytes 2 [emitted] -main-runtime.[chunkhash].js 7.49 KiB 3 [emitted] main-runtime -Entrypoint main = main-runtime.[chunkhash].js main.[chunkhash].js -chunk {0} main.[chunkhash].js (main) 159 bytes ={3}= >{1}< >{2}< [initial] [rendered] +runtime~main.[chunkhash].js 7.49 KiB 3 [emitted] runtime~main +Entrypoint main = runtime~main.[chunkhash].js main.[chunkhash].js +chunk {0} main.[chunkhash].js (main) 58 bytes ={3}= >{1}< >{2}< [initial] [rendered] > ./example main - [0] ./example.js 90 bytes {0} [built] - [no exports] + [0] ./example.js 58 bytes {0} [built] single entry ./example main - [1] ./vendor.js 69 bytes {0} [built] - [exports: default] - harmony side effect evaluation ./vendor [0] ./example.js 1:0-30 chunk {1} 1.[chunkhash].js 29 bytes <{3}> <{0}> [rendered] - > ./async1 [0] ./example.js 3:0-18 - [2] ./async1.js 29 bytes {1} [built] - import() ./async1 [0] ./example.js 3:0-18 + > ./async1 [0] ./example.js 2:0-18 + [1] ./async1.js 29 bytes {1} [built] + import() ./async1 [0] ./example.js 2:0-18 chunk {2} 2.[chunkhash].js 29 bytes <{3}> <{0}> [rendered] - > ./async2 [0] ./example.js 4:0-18 - [3] ./async2.js 29 bytes {2} [built] - import() ./async2 [0] ./example.js 4:0-18 -chunk {3} main-runtime.[chunkhash].js (main-runtime) 0 bytes ={0}= >{1}< >{2}< [entry] [rendered] + > ./async2 [0] ./example.js 3:0-18 + [2] ./async2.js 29 bytes {2} [built] + import() ./async2 [0] ./example.js 3:0-18 +chunk {3} runtime~main.[chunkhash].js (runtime~main) 0 bytes ={0}= >{1}< >{2}< [entry] [rendered] > ./example main ``` @@ -351,29 +318,21 @@ Version: webpack next Asset Size Chunks Chunk Names 0.[chunkhash].js 77 bytes 0 [emitted] 1.[chunkhash].js 78 bytes 1 [emitted] -main-runtime.[chunkhash].js 1.76 KiB 2 [emitted] main-runtime - main.[chunkhash].js 289 bytes 3 [emitted] main -Entrypoint main = main-runtime.[chunkhash].js main.[chunkhash].js +runtime~main.[chunkhash].js 1.76 KiB 2 [emitted] runtime~main + main.[chunkhash].js 269 bytes 3 [emitted] main +Entrypoint main = runtime~main.[chunkhash].js main.[chunkhash].js chunk {0} 0.[chunkhash].js 29 bytes <{2}> <{3}> [rendered] - > ./async2 [] 4:0-18 + > ./async2 [0] ./example.js 3:0-18 [1] ./async2.js 29 bytes {0} [built] - import() ./async2 ./example.js 4:0-18 + import() ./async2 [0] ./example.js 3:0-18 chunk {1} 1.[chunkhash].js 29 bytes <{2}> <{3}> [rendered] - > ./async1 [] 3:0-18 + > ./async1 [0] ./example.js 2:0-18 [2] ./async1.js 29 bytes {1} [built] - import() ./async1 ./example.js 3:0-18 -chunk {2} main-runtime.[chunkhash].js (main-runtime) 0 bytes ={3}= >{0}< >{1}< [entry] [rendered] + import() ./async1 [0] ./example.js 2:0-18 +chunk {2} runtime~main.[chunkhash].js (runtime~main) 0 bytes ={3}= >{0}< >{1}< [entry] [rendered] > ./example main -chunk {3} main.[chunkhash].js (main) 159 bytes ={2}= >{0}< >{1}< [initial] [rendered] +chunk {3} main.[chunkhash].js (main) 58 bytes ={2}= >{0}< >{1}< [initial] [rendered] > ./example main - [0] ./example.js + 1 modules 159 bytes {3} [built] - [no exports] + [0] ./example.js 58 bytes {3} [built] single entry ./example main - | ./example.js 90 bytes [built] - | [no exports] - | single entry ./example main - | ./vendor.js 69 bytes [built] - | [exports: default] - | [no exports used] - | harmony side effect evaluation ./vendor ./example.js 1:0-30 ``` diff --git a/examples/source-map/README.md b/examples/source-map/README.md index 96d89ef41..5a955bd7c 100644 --- a/examples/source-map/README.md +++ b/examples/source-map/README.md @@ -84,7 +84,7 @@ race = function() { ``` ``` javascript -{"version":3,"sources":["webpack:///./example.coffee"],"names":[],"mappings":";;;;;;;;AAGA;EAAA;;AAAA,OACE;EAAA,MAAQ,IAAI,CAAC,IAAb;EACA,QAAQ,MADR;EAEA,MAAQ,SAAC,CAAD;WAAO,IAAI,OAAO,CAAP;EAAX,CAFR;;;AAKF,OAAO;AACL;EADM,uBAAQ;SACd,MAAM,MAAN,EAAc,OAAd;AADK","file":"./bundle-source-map.js","sourcesContent":["# Taken from http://coffeescript.org/\r\n\r\n# Objects:\r\nmath =\r\n root: Math.sqrt\r\n square: square\r\n cube: (x) -> x * square x\r\n\r\n# Splats:\r\nrace = (winner, runners...) ->\r\n print winner, runners\r\n\n\n\n// WEBPACK FOOTER //\n// ./example.coffee"],"sourceRoot":""} +{"version":3,"sources":["webpack:///./example.coffee"],"names":[],"mappings":";;;;;;;;AAGA;EAAA;;AAAA,OACE;EAAA,MAAQ,IAAI,CAAC,IAAb;EACA,QAAQ,MADR;EAEA,MAAQ,SAAC,CAAD;WAAO,IAAI,OAAO,CAAP;EAAX,CAFR;;;AAKF,OAAO;AACL;EADM,uBAAQ;SACd,MAAM,MAAN,EAAc,OAAd;AADK","file":"./bundle-source-map.js","sourcesContent":["# Taken from http://coffeescript.org/\r\n\r\n# Objects:\r\nmath =\r\n root: Math.sqrt\r\n square: square\r\n cube: (x) -> x * square x\r\n\r\n# Splats:\r\nrace = (winner, runners...) ->\r\n print winner, runners\r\n"],"sourceRoot":""} ``` ## hidden-source-map.js and hidden-source-map.js.map @@ -120,7 +120,7 @@ race = function() { ``` ``` javascript -{"version":3,"sources":["webpack:///./example.coffee"],"names":[],"mappings":";;;;;;;;AAGA;EAAA;;AAAA,OACE;EAAA,MAAQ,IAAI,CAAC,IAAb;EACA,QAAQ,MADR;EAEA,MAAQ,SAAC,CAAD;WAAO,IAAI,OAAO,CAAP;EAAX,CAFR;;;AAKF,OAAO;AACL;EADM,uBAAQ;SACd,MAAM,MAAN,EAAc,OAAd;AADK","file":"./bundle-hidden-source-map.js","sourcesContent":["# Taken from http://coffeescript.org/\r\n\r\n# Objects:\r\nmath =\r\n root: Math.sqrt\r\n square: square\r\n cube: (x) -> x * square x\r\n\r\n# Splats:\r\nrace = (winner, runners...) ->\r\n print winner, runners\r\n\n\n\n// WEBPACK FOOTER //\n// ./example.coffee"],"sourceRoot":""} +{"version":3,"sources":["webpack:///./example.coffee"],"names":[],"mappings":";;;;;;;;AAGA;EAAA;;AAAA,OACE;EAAA,MAAQ,IAAI,CAAC,IAAb;EACA,QAAQ,MADR;EAEA,MAAQ,SAAC,CAAD;WAAO,IAAI,OAAO,CAAP;EAAX,CAFR;;;AAKF,OAAO;AACL;EADM,uBAAQ;SACd,MAAM,MAAN,EAAc,OAAd;AADK","file":"./bundle-hidden-source-map.js","sourcesContent":["# Taken from http://coffeescript.org/\r\n\r\n# Objects:\r\nmath =\r\n root: Math.sqrt\r\n square: square\r\n cube: (x) -> x * square x\r\n\r\n# Splats:\r\nrace = (winner, runners...) ->\r\n print winner, runners\r\n"],"sourceRoot":""} ``` ## inline-source-map.js @@ -153,7 +153,7 @@ race = function() { /***/ }) ],[[0,1]]]); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9leGFtcGxlLmNvZmZlZSJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7OztBQUdBO0VBQUE7O0FBQUEsT0FDRTtFQUFBLE1BQVEsSUFBSSxDQUFDLElBQWI7RUFDQSxRQUFRLE1BRFI7RUFFQSxNQUFRLFNBQUMsQ0FBRDtXQUFPLElBQUksT0FBTyxDQUFQO0VBQVgsQ0FGUjs7O0FBS0YsT0FBTztBQUNMO0VBRE0sdUJBQVE7U0FDZCxNQUFNLE1BQU4sRUFBYyxPQUFkO0FBREsiLCJmaWxlIjoiLi9idW5kbGUtaW5saW5lLXNvdXJjZS1tYXAuanMiLCJzb3VyY2VzQ29udGVudCI6WyIjIFRha2VuIGZyb20gaHR0cDovL2NvZmZlZXNjcmlwdC5vcmcvXHJcblxyXG4jIE9iamVjdHM6XHJcbm1hdGggPVxyXG4gIHJvb3Q6ICAgTWF0aC5zcXJ0XHJcbiAgc3F1YXJlOiBzcXVhcmVcclxuICBjdWJlOiAgICh4KSAtPiB4ICogc3F1YXJlIHhcclxuXHJcbiMgU3BsYXRzOlxyXG5yYWNlID0gKHdpbm5lciwgcnVubmVycy4uLikgLT5cclxuICBwcmludCB3aW5uZXIsIHJ1bm5lcnNcclxuXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIC4vZXhhbXBsZS5jb2ZmZWUiXSwic291cmNlUm9vdCI6IiJ9 +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9leGFtcGxlLmNvZmZlZSJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7OztBQUdBO0VBQUE7O0FBQUEsT0FDRTtFQUFBLE1BQVEsSUFBSSxDQUFDLElBQWI7RUFDQSxRQUFRLE1BRFI7RUFFQSxNQUFRLFNBQUMsQ0FBRDtXQUFPLElBQUksT0FBTyxDQUFQO0VBQVgsQ0FGUjs7O0FBS0YsT0FBTztBQUNMO0VBRE0sdUJBQVE7U0FDZCxNQUFNLE1BQU4sRUFBYyxPQUFkO0FBREsiLCJmaWxlIjoiLi9idW5kbGUtaW5saW5lLXNvdXJjZS1tYXAuanMiLCJzb3VyY2VzQ29udGVudCI6WyIjIFRha2VuIGZyb20gaHR0cDovL2NvZmZlZXNjcmlwdC5vcmcvXHJcblxyXG4jIE9iamVjdHM6XHJcbm1hdGggPVxyXG4gIHJvb3Q6ICAgTWF0aC5zcXJ0XHJcbiAgc3F1YXJlOiBzcXVhcmVcclxuICBjdWJlOiAgICh4KSAtPiB4ICogc3F1YXJlIHhcclxuXHJcbiMgU3BsYXRzOlxyXG5yYWNlID0gKHdpbm5lciwgcnVubmVycy4uLikgLT5cclxuICBwcmludCB3aW5uZXIsIHJ1bm5lcnNcclxuIl0sInNvdXJjZVJvb3QiOiIifQ== ``` ## nosources-source-map.js.map @@ -171,7 +171,7 @@ race = function() { /*! no static exports found */ /***/ (function(module, exports) { -eval("var math, race,\n slice = [].slice;\n\nmath = {\n root: Math.sqrt,\n square: square,\n cube: function(x) {\n return x * square(x);\n }\n};\n\nrace = function() {\n var runners, winner;\n winner = arguments[0], runners = 2 <= arguments.length ? slice.call(arguments, 1) : [];\n return print(winner, runners);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9leGFtcGxlLmNvZmZlZT85MWU1Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUdBO0VBQUE7O0FBQUEsT0FDRTtFQUFBLE1BQVEsSUFBSSxDQUFDLElBQWI7RUFDQSxRQUFRLE1BRFI7RUFFQSxNQUFRLFNBQUMsQ0FBRDtXQUFPLElBQUksT0FBTyxDQUFQO0VBQVgsQ0FGUjs7O0FBS0YsT0FBTztBQUNMO0VBRE0sdUJBQVE7U0FDZCxNQUFNLE1BQU4sRUFBYyxPQUFkO0FBREsiLCJmaWxlIjoiMC5qcyIsInNvdXJjZXNDb250ZW50IjpbIiMgVGFrZW4gZnJvbSBodHRwOi8vY29mZmVlc2NyaXB0Lm9yZy9cclxuXHJcbiMgT2JqZWN0czpcclxubWF0aCA9XHJcbiAgcm9vdDogICBNYXRoLnNxcnRcclxuICBzcXVhcmU6IHNxdWFyZVxyXG4gIGN1YmU6ICAgKHgpIC0+IHggKiBzcXVhcmUgeFxyXG5cclxuIyBTcGxhdHM6XHJcbnJhY2UgPSAod2lubmVyLCBydW5uZXJzLi4uKSAtPlxyXG4gIHByaW50IHdpbm5lciwgcnVubmVyc1xyXG5cblxuXG4vLyBXRUJQQUNLIEZPT1RFUiAvL1xuLy8gLi9leGFtcGxlLmNvZmZlZSJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///0\n"); +eval("var math, race,\n slice = [].slice;\n\nmath = {\n root: Math.sqrt,\n square: square,\n cube: function(x) {\n return x * square(x);\n }\n};\n\nrace = function() {\n var runners, winner;\n winner = arguments[0], runners = 2 <= arguments.length ? slice.call(arguments, 1) : [];\n return print(winner, runners);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9leGFtcGxlLmNvZmZlZT85MWU1Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUdBO0VBQUE7O0FBQUEsT0FDRTtFQUFBLE1BQVEsSUFBSSxDQUFDLElBQWI7RUFDQSxRQUFRLE1BRFI7RUFFQSxNQUFRLFNBQUMsQ0FBRDtXQUFPLElBQUksT0FBTyxDQUFQO0VBQVgsQ0FGUjs7O0FBS0YsT0FBTztBQUNMO0VBRE0sdUJBQVE7U0FDZCxNQUFNLE1BQU4sRUFBYyxPQUFkO0FBREsiLCJmaWxlIjoiMC5qcyIsInNvdXJjZXNDb250ZW50IjpbIiMgVGFrZW4gZnJvbSBodHRwOi8vY29mZmVlc2NyaXB0Lm9yZy9cclxuXHJcbiMgT2JqZWN0czpcclxubWF0aCA9XHJcbiAgcm9vdDogICBNYXRoLnNxcnRcclxuICBzcXVhcmU6IHNxdWFyZVxyXG4gIGN1YmU6ICAgKHgpIC0+IHggKiBzcXVhcmUgeFxyXG5cclxuIyBTcGxhdHM6XHJcbnJhY2UgPSAod2lubmVyLCBydW5uZXJzLi4uKSAtPlxyXG4gIHByaW50IHdpbm5lciwgcnVubmVyc1xyXG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///0\n"); /***/ }) ],[[0,1]]]); @@ -187,7 +187,7 @@ eval("var math, race,\n slice = [].slice;\n\nmath = {\n root: Math.sqrt,\n sq /*! no static exports found */ /***/ (function(module, exports) { -eval("var math, race,\n slice = [].slice;\n\nmath = {\n root: Math.sqrt,\n square: square,\n cube: function(x) {\n return x * square(x);\n }\n};\n\nrace = function() {\n var runners, winner;\n winner = arguments[0], runners = 2 <= arguments.length ? slice.call(arguments, 1) : [];\n return print(winner, runners);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/node_modules/coffee-loader!./example.coffee\n// module id = 0\n// module chunks = 0\n\n//# sourceURL=webpack:///./example.coffee?(webpack)/node_modules/coffee-loader"); +eval("var math, race,\n slice = [].slice;\n\nmath = {\n root: Math.sqrt,\n square: square,\n cube: function(x) {\n return x * square(x);\n }\n};\n\nrace = function() {\n var runners, winner;\n winner = arguments[0], runners = 2 <= arguments.length ? slice.call(arguments, 1) : [];\n return print(winner, runners);\n};\n\n\n//# sourceURL=webpack:///./example.coffee?(webpack)/node_modules/coffee-loader"); /***/ }) ],[[0,1]]]); @@ -203,7 +203,7 @@ eval("var math, race,\n slice = [].slice;\n\nmath = {\n root: Math.sqrt,\n sq /*! no static exports found */ /***/ (function(module, exports) { -eval("var math, race,\n slice = [].slice;\n\nmath = {\n root: Math.sqrt,\n square: square,\n cube: function(x) {\n return x * square(x);\n }\n};\n\nrace = function() {\n var runners, winner;\n winner = arguments[0], runners = 2 <= arguments.length ? slice.call(arguments, 1) : [];\n return print(winner, runners);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2V4YW1wbGUuY29mZmVlPzA5MjciXSwic291cmNlc0NvbnRlbnQiOlsidmFyIG1hdGgsIHJhY2UsXG4gIHNsaWNlID0gW10uc2xpY2U7XG5cbm1hdGggPSB7XG4gIHJvb3Q6IE1hdGguc3FydCxcbiAgc3F1YXJlOiBzcXVhcmUsXG4gIGN1YmU6IGZ1bmN0aW9uKHgpIHtcbiAgICByZXR1cm4geCAqIHNxdWFyZSh4KTtcbiAgfVxufTtcblxucmFjZSA9IGZ1bmN0aW9uKCkge1xuICB2YXIgcnVubmVycywgd2lubmVyO1xuICB3aW5uZXIgPSBhcmd1bWVudHNbMF0sIHJ1bm5lcnMgPSAyIDw9IGFyZ3VtZW50cy5sZW5ndGggPyBzbGljZS5jYWxsKGFyZ3VtZW50cywgMSkgOiBbXTtcbiAgcmV0dXJuIHByaW50KHdpbm5lciwgcnVubmVycyk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gKHdlYnBhY2spL25vZGVfbW9kdWxlcy9jb2ZmZWUtbG9hZGVyIS4vZXhhbXBsZS5jb2ZmZWVcbi8vIG1vZHVsZSBpZCA9IDBcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///0\n"); +eval("var math, race,\n slice = [].slice;\n\nmath = {\n root: Math.sqrt,\n square: square,\n cube: function(x) {\n return x * square(x);\n }\n};\n\nrace = function() {\n var runners, winner;\n winner = arguments[0], runners = 2 <= arguments.length ? slice.call(arguments, 1) : [];\n return print(winner, runners);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2V4YW1wbGUuY29mZmVlPzA5MjciXSwic291cmNlc0NvbnRlbnQiOlsidmFyIG1hdGgsIHJhY2UsXG4gIHNsaWNlID0gW10uc2xpY2U7XG5cbm1hdGggPSB7XG4gIHJvb3Q6IE1hdGguc3FydCxcbiAgc3F1YXJlOiBzcXVhcmUsXG4gIGN1YmU6IGZ1bmN0aW9uKHgpIHtcbiAgICByZXR1cm4geCAqIHNxdWFyZSh4KTtcbiAgfVxufTtcblxucmFjZSA9IGZ1bmN0aW9uKCkge1xuICB2YXIgcnVubmVycywgd2lubmVyO1xuICB3aW5uZXIgPSBhcmd1bWVudHNbMF0sIHJ1bm5lcnMgPSAyIDw9IGFyZ3VtZW50cy5sZW5ndGggPyBzbGljZS5jYWxsKGFyZ3VtZW50cywgMSkgOiBbXTtcbiAgcmV0dXJuIHByaW50KHdpbm5lciwgcnVubmVycyk7XG59O1xuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///0\n"); /***/ }) ],[[0,1]]]); @@ -219,7 +219,7 @@ eval("var math, race,\n slice = [].slice;\n\nmath = {\n root: Math.sqrt,\n sq /*! no static exports found */ /***/ (function(module, exports) { -eval("var math, race,\n slice = [].slice;\n\nmath = {\n root: Math.sqrt,\n square: square,\n cube: function(x) {\n return x * square(x);\n }\n};\n\nrace = function() {\n var runners, winner;\n winner = arguments[0], runners = 2 <= arguments.length ? slice.call(arguments, 1) : [];\n return print(winner, runners);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2V4YW1wbGUuY29mZmVlPzkxZTUiXSwic291cmNlc0NvbnRlbnQiOlsiIyBUYWtlbiBmcm9tIGh0dHA6Ly9jb2ZmZWVzY3JpcHQub3JnL1xyXG5cclxuIyBPYmplY3RzOlxyXG5tYXRoID1cclxuICByb290OiAgIE1hdGguc3FydFxyXG4gIHNxdWFyZTogc3F1YXJlXHJcbiAgY3ViZTogICAoeCkgLT4geCAqIHNxdWFyZSB4XHJcblxyXG4jIFNwbGF0czpcclxucmFjZSA9ICh3aW5uZXIsIHJ1bm5lcnMuLi4pIC0+XHJcbiAgcHJpbnQgd2lubmVyLCBydW5uZXJzXHJcblxuXG5cbi8vIFdFQlBBQ0sgRk9PVEVSIC8vXG4vLyAuL2V4YW1wbGUuY29mZmVlIl0sIm1hcHBpbmdzIjoiQUFHQTtBQUFBO0FBQ0E7QUFEQTtBQUNBO0FBQ0E7QUFDQTtBQUFBO0FBQUE7OztBQUdBO0FBQ0E7QUFEQTtBQUNBO0FBREE7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///0\n"); +eval("var math, race,\n slice = [].slice;\n\nmath = {\n root: Math.sqrt,\n square: square,\n cube: function(x) {\n return x * square(x);\n }\n};\n\nrace = function() {\n var runners, winner;\n winner = arguments[0], runners = 2 <= arguments.length ? slice.call(arguments, 1) : [];\n return print(winner, runners);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2V4YW1wbGUuY29mZmVlPzkxZTUiXSwic291cmNlc0NvbnRlbnQiOlsiIyBUYWtlbiBmcm9tIGh0dHA6Ly9jb2ZmZWVzY3JpcHQub3JnL1xyXG5cclxuIyBPYmplY3RzOlxyXG5tYXRoID1cclxuICByb290OiAgIE1hdGguc3FydFxyXG4gIHNxdWFyZTogc3F1YXJlXHJcbiAgY3ViZTogICAoeCkgLT4geCAqIHNxdWFyZSB4XHJcblxyXG4jIFNwbGF0czpcclxucmFjZSA9ICh3aW5uZXIsIHJ1bm5lcnMuLi4pIC0+XHJcbiAgcHJpbnQgd2lubmVyLCBydW5uZXJzXHJcbiJdLCJtYXBwaW5ncyI6IkFBR0E7QUFBQTtBQUNBO0FBREE7QUFDQTtBQUNBO0FBQ0E7QUFBQTtBQUFBOzs7QUFHQTtBQUNBO0FBREE7QUFDQTtBQURBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///0\n"); /***/ }) ],[[0,1]]]); @@ -227,12 +227,12 @@ eval("var math, race,\n slice = [].slice;\n\nmath = {\n root: Math.sqrt,\n sq ## cheap-module-source-map.js.map ``` javascript -{"version":3,"file":"./bundle-cheap-module-source-map.js","sources":["webpack:///./example.coffee"],"sourcesContent":["# Taken from http://coffeescript.org/\r\n\r\n# Objects:\r\nmath =\r\n root: Math.sqrt\r\n square: square\r\n cube: (x) -> x * square x\r\n\r\n# Splats:\r\nrace = (winner, runners...) ->\r\n print winner, runners\r\n\n\n\n// WEBPACK FOOTER //\n// ./example.coffee"],"mappings":";;;;;;;;AAGA;AAAA;AACA;AADA;AACA;AACA;AACA;AAAA;AAAA;;;AAGA;AACA;AADA;AACA;AADA;;;;A","sourceRoot":""} +{"version":3,"file":"./bundle-cheap-module-source-map.js","sources":["webpack:///./example.coffee"],"sourcesContent":["# Taken from http://coffeescript.org/\r\n\r\n# Objects:\r\nmath =\r\n root: Math.sqrt\r\n square: square\r\n cube: (x) -> x * square x\r\n\r\n# Splats:\r\nrace = (winner, runners...) ->\r\n print winner, runners\r\n"],"mappings":";;;;;;;;AAGA;AAAA;AACA;AADA;AACA;AACA;AACA;AAAA;AAAA;;;AAGA;AACA;AADA;AACA;AADA;;;;A","sourceRoot":""} ``` ## cheap-source-map.js.map ``` javascript -{"version":3,"file":"./bundle-cheap-source-map.js","sources":["webpack:///./example.coffee"],"sourcesContent":["var math, race,\n slice = [].slice;\n\nmath = {\n root: Math.sqrt,\n square: square,\n cube: function(x) {\n return x * square(x);\n }\n};\n\nrace = function() {\n var runners, winner;\n winner = arguments[0], runners = 2 <= arguments.length ? slice.call(arguments, 1) : [];\n return print(winner, runners);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/node_modules/coffee-loader!./example.coffee\n// module id = 0\n// module chunks = 0"],"mappings":";;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;A","sourceRoot":""} +{"version":3,"file":"./bundle-cheap-source-map.js","sources":["webpack:///./example.coffee"],"sourcesContent":["var math, race,\n slice = [].slice;\n\nmath = {\n root: Math.sqrt,\n square: square,\n cube: function(x) {\n return x * square(x);\n }\n};\n\nrace = function() {\n var runners, winner;\n winner = arguments[0], runners = 2 <= arguments.length ? slice.call(arguments, 1) : [];\n return print(winner, runners);\n};\n"],"mappings":";;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;A","sourceRoot":""} ``` # webpack output @@ -243,131 +243,131 @@ Version: webpack next Child Hash: 0a1b2c3d4e5f6a7b8c9d Asset Size Chunks Chunk Names - ./bundle-cheap-eval-source-map.js 1.68 KiB 0 [emitted] bundle - ./bundle-runtime-cheap-eval-source-map.js 4.93 KiB 1 [emitted] bundle-runtime - Entrypoint bundle = ./bundle-runtime-cheap-eval-source-map.js ./bundle-cheap-eval-source-map.js + ./bundle-cheap-eval-source-map.js 1.5 KiB 0 [emitted] bundle + ./runtime~bundle-cheap-eval-source-map.js 4.93 KiB 1 [emitted] runtime~bundle + Entrypoint bundle = ./runtime~bundle-cheap-eval-source-map.js ./bundle-cheap-eval-source-map.js chunk {0} ./bundle-cheap-eval-source-map.js (bundle) 308 bytes ={1}= [initial] [rendered] > coffee-loader!./example.coffee bundle [0] (webpack)/node_modules/coffee-loader!./example.coffee 308 bytes {0} [built] single entry coffee-loader!./example.coffee bundle - chunk {1} ./bundle-runtime-cheap-eval-source-map.js (bundle-runtime) 0 bytes ={0}= [entry] [rendered] + chunk {1} ./runtime~bundle-cheap-eval-source-map.js (runtime~bundle) 0 bytes ={0}= [entry] [rendered] > coffee-loader!./example.coffee bundle Child Hash: 0a1b2c3d4e5f6a7b8c9d Asset Size Chunks Chunk Names - ./bundle-cheap-module-eval-source-map.js 1.42 KiB 0 [emitted] bundle - ./bundle-runtime-cheap-module-eval-source-map.js 4.93 KiB 1 [emitted] bundle-runtime - Entrypoint bundle = ./bundle-runtime-cheap-module-eval-source-map.js ./bundle-cheap-module-eval-source-map.js + ./bundle-cheap-module-eval-source-map.js 1.36 KiB 0 [emitted] bundle + ./runtime~bundle-cheap-module-eval-source-map.js 4.93 KiB 1 [emitted] runtime~bundle + Entrypoint bundle = ./runtime~bundle-cheap-module-eval-source-map.js ./bundle-cheap-module-eval-source-map.js chunk {0} ./bundle-cheap-module-eval-source-map.js (bundle) 308 bytes ={1}= [initial] [rendered] > coffee-loader!./example.coffee bundle [0] (webpack)/node_modules/coffee-loader!./example.coffee 308 bytes {0} [built] single entry coffee-loader!./example.coffee bundle - chunk {1} ./bundle-runtime-cheap-module-eval-source-map.js (bundle-runtime) 0 bytes ={0}= [entry] [rendered] + chunk {1} ./runtime~bundle-cheap-module-eval-source-map.js (runtime~bundle) 0 bytes ={0}= [entry] [rendered] > coffee-loader!./example.coffee bundle Child Hash: 0a1b2c3d4e5f6a7b8c9d Asset Size Chunks Chunk Names ./bundle-cheap-module-source-map.js 733 bytes 0 [emitted] bundle - ./bundle-runtime-cheap-module-source-map.js 5 KiB 1 [emitted] bundle-runtime - ./bundle-cheap-module-source-map.js.map 506 bytes 0 [emitted] bundle - ./bundle-runtime-cheap-module-source-map.js.map 4.96 KiB 1 [emitted] bundle-runtime - Entrypoint bundle = ./bundle-runtime-cheap-module-source-map.js ./bundle-runtime-cheap-module-source-map.js.map ./bundle-cheap-module-source-map.js ./bundle-cheap-module-source-map.js.map + ./runtime~bundle-cheap-module-source-map.js 5 KiB 1 [emitted] runtime~bundle + ./bundle-cheap-module-source-map.js.map 459 bytes 0 [emitted] bundle + ./runtime~bundle-cheap-module-source-map.js.map 4.92 KiB 1 [emitted] runtime~bundle + Entrypoint bundle = ./runtime~bundle-cheap-module-source-map.js ./runtime~bundle-cheap-module-source-map.js.map ./bundle-cheap-module-source-map.js ./bundle-cheap-module-source-map.js.map chunk {0} ./bundle-cheap-module-source-map.js, ./bundle-cheap-module-source-map.js.map (bundle) 308 bytes ={1}= [initial] [rendered] > coffee-loader!./example.coffee bundle [0] (webpack)/node_modules/coffee-loader!./example.coffee 308 bytes {0} [built] single entry coffee-loader!./example.coffee bundle - chunk {1} ./bundle-runtime-cheap-module-source-map.js, ./bundle-runtime-cheap-module-source-map.js.map (bundle-runtime) 0 bytes ={0}= [entry] [rendered] + chunk {1} ./runtime~bundle-cheap-module-source-map.js, ./runtime~bundle-cheap-module-source-map.js.map (runtime~bundle) 0 bytes ={0}= [entry] [rendered] > coffee-loader!./example.coffee bundle Child Hash: 0a1b2c3d4e5f6a7b8c9d Asset Size Chunks Chunk Names ./bundle-cheap-source-map.js 726 bytes 0 [emitted] bundle - ./bundle-runtime-cheap-source-map.js 4.99 KiB 1 [emitted] bundle-runtime - ./bundle-cheap-source-map.js.map 702 bytes 0 [emitted] bundle - ./bundle-runtime-cheap-source-map.js.map 4.96 KiB 1 [emitted] bundle-runtime - Entrypoint bundle = ./bundle-runtime-cheap-source-map.js ./bundle-runtime-cheap-source-map.js.map ./bundle-cheap-source-map.js ./bundle-cheap-source-map.js.map + ./runtime~bundle-cheap-source-map.js 4.99 KiB 1 [emitted] runtime~bundle + ./bundle-cheap-source-map.js.map 561 bytes 0 [emitted] bundle + ./runtime~bundle-cheap-source-map.js.map 4.91 KiB 1 [emitted] runtime~bundle + Entrypoint bundle = ./runtime~bundle-cheap-source-map.js ./runtime~bundle-cheap-source-map.js.map ./bundle-cheap-source-map.js ./bundle-cheap-source-map.js.map chunk {0} ./bundle-cheap-source-map.js, ./bundle-cheap-source-map.js.map (bundle) 308 bytes ={1}= [initial] [rendered] > coffee-loader!./example.coffee bundle [0] (webpack)/node_modules/coffee-loader!./example.coffee 308 bytes {0} [built] single entry coffee-loader!./example.coffee bundle - chunk {1} ./bundle-runtime-cheap-source-map.js, ./bundle-runtime-cheap-source-map.js.map (bundle-runtime) 0 bytes ={0}= [entry] [rendered] + chunk {1} ./runtime~bundle-cheap-source-map.js, ./runtime~bundle-cheap-source-map.js.map (runtime~bundle) 0 bytes ={0}= [entry] [rendered] > coffee-loader!./example.coffee bundle Child Hash: 0a1b2c3d4e5f6a7b8c9d Asset Size Chunks Chunk Names - ./bundle-eval.js 920 bytes 0 [emitted] bundle - ./bundle-runtime-eval.js 4.93 KiB 1 [emitted] bundle-runtime - Entrypoint bundle = ./bundle-runtime-eval.js ./bundle-eval.js + ./bundle-eval.js 781 bytes 0 [emitted] bundle + ./runtime~bundle-eval.js 4.93 KiB 1 [emitted] runtime~bundle + Entrypoint bundle = ./runtime~bundle-eval.js ./bundle-eval.js chunk {0} ./bundle-eval.js (bundle) 308 bytes ={1}= [initial] [rendered] > coffee-loader!./example.coffee bundle [0] (webpack)/node_modules/coffee-loader!./example.coffee 308 bytes {0} [built] single entry coffee-loader!./example.coffee bundle - chunk {1} ./bundle-runtime-eval.js (bundle-runtime) 0 bytes ={0}= [entry] [rendered] + chunk {1} ./runtime~bundle-eval.js (runtime~bundle) 0 bytes ={0}= [entry] [rendered] > coffee-loader!./example.coffee bundle Child Hash: 0a1b2c3d4e5f6a7b8c9d Asset Size Chunks Chunk Names - ./bundle-eval-source-map.js 1.56 KiB 0 [emitted] bundle - ./bundle-runtime-eval-source-map.js 4.93 KiB 1 [emitted] bundle-runtime - Entrypoint bundle = ./bundle-runtime-eval-source-map.js ./bundle-eval-source-map.js + ./bundle-eval-source-map.js 1.49 KiB 0 [emitted] bundle + ./runtime~bundle-eval-source-map.js 4.93 KiB 1 [emitted] runtime~bundle + Entrypoint bundle = ./runtime~bundle-eval-source-map.js ./bundle-eval-source-map.js chunk {0} ./bundle-eval-source-map.js (bundle) 308 bytes ={1}= [initial] [rendered] > coffee-loader!./example.coffee bundle [0] (webpack)/node_modules/coffee-loader!./example.coffee 308 bytes {0} [built] single entry coffee-loader!./example.coffee bundle - chunk {1} ./bundle-runtime-eval-source-map.js (bundle-runtime) 0 bytes ={0}= [entry] [rendered] + chunk {1} ./runtime~bundle-eval-source-map.js (runtime~bundle) 0 bytes ={0}= [entry] [rendered] > coffee-loader!./example.coffee bundle Child Hash: 0a1b2c3d4e5f6a7b8c9d Asset Size Chunks Chunk Names ./bundle-hidden-source-map.js 674 bytes 0 [emitted] bundle - ./bundle-runtime-hidden-source-map.js 4.93 KiB 1 [emitted] bundle-runtime - ./bundle-hidden-source-map.js.map 603 bytes 0 [emitted] bundle - ./bundle-runtime-hidden-source-map.js.map 5 KiB 1 [emitted] bundle-runtime - Entrypoint bundle = ./bundle-runtime-hidden-source-map.js ./bundle-runtime-hidden-source-map.js.map ./bundle-hidden-source-map.js ./bundle-hidden-source-map.js.map + ./runtime~bundle-hidden-source-map.js 4.93 KiB 1 [emitted] runtime~bundle + ./bundle-hidden-source-map.js.map 556 bytes 0 [emitted] bundle + ./runtime~bundle-hidden-source-map.js.map 4.96 KiB 1 [emitted] runtime~bundle + Entrypoint bundle = ./runtime~bundle-hidden-source-map.js ./runtime~bundle-hidden-source-map.js.map ./bundle-hidden-source-map.js ./bundle-hidden-source-map.js.map chunk {0} ./bundle-hidden-source-map.js, ./bundle-hidden-source-map.js.map (bundle) 308 bytes ={1}= [initial] [rendered] > coffee-loader!./example.coffee bundle [0] (webpack)/node_modules/coffee-loader!./example.coffee 308 bytes {0} [built] single entry coffee-loader!./example.coffee bundle - chunk {1} ./bundle-runtime-hidden-source-map.js, ./bundle-runtime-hidden-source-map.js.map (bundle-runtime) 0 bytes ={0}= [entry] [rendered] + chunk {1} ./runtime~bundle-hidden-source-map.js, ./runtime~bundle-hidden-source-map.js.map (runtime~bundle) 0 bytes ={0}= [entry] [rendered] > coffee-loader!./example.coffee bundle Child Hash: 0a1b2c3d4e5f6a7b8c9d Asset Size Chunks Chunk Names - ./bundle-inline-source-map.js 1.51 KiB 0 [emitted] bundle - ./bundle-runtime-inline-source-map.js 11.7 KiB 1 [emitted] bundle-runtime - Entrypoint bundle = ./bundle-runtime-inline-source-map.js ./bundle-inline-source-map.js + ./bundle-inline-source-map.js 1.45 KiB 0 [emitted] bundle + ./runtime~bundle-inline-source-map.js 11.6 KiB 1 [emitted] runtime~bundle + Entrypoint bundle = ./runtime~bundle-inline-source-map.js ./bundle-inline-source-map.js chunk {0} ./bundle-inline-source-map.js (bundle) 308 bytes ={1}= [initial] [rendered] > coffee-loader!./example.coffee bundle [0] (webpack)/node_modules/coffee-loader!./example.coffee 308 bytes {0} [built] single entry coffee-loader!./example.coffee bundle - chunk {1} ./bundle-runtime-inline-source-map.js (bundle-runtime) 0 bytes ={0}= [entry] [rendered] + chunk {1} ./runtime~bundle-inline-source-map.js (runtime~bundle) 0 bytes ={0}= [entry] [rendered] > coffee-loader!./example.coffee bundle Child Hash: 0a1b2c3d4e5f6a7b8c9d Asset Size Chunks Chunk Names ./bundle-nosources-source-map.js 730 bytes 0 [emitted] bundle - ./bundle-runtime-nosources-source-map.js 5 KiB 1 [emitted] bundle-runtime + ./runtime~bundle-nosources-source-map.js 5 KiB 1 [emitted] runtime~bundle ./bundle-nosources-source-map.js.map 314 bytes 0 [emitted] bundle - ./bundle-runtime-nosources-source-map.js.map 838 bytes 1 [emitted] bundle-runtime - Entrypoint bundle = ./bundle-runtime-nosources-source-map.js ./bundle-runtime-nosources-source-map.js.map ./bundle-nosources-source-map.js ./bundle-nosources-source-map.js.map + ./runtime~bundle-nosources-source-map.js.map 838 bytes 1 [emitted] runtime~bundle + Entrypoint bundle = ./runtime~bundle-nosources-source-map.js ./runtime~bundle-nosources-source-map.js.map ./bundle-nosources-source-map.js ./bundle-nosources-source-map.js.map chunk {0} ./bundle-nosources-source-map.js, ./bundle-nosources-source-map.js.map (bundle) 308 bytes ={1}= [initial] [rendered] > coffee-loader!./example.coffee bundle [0] (webpack)/node_modules/coffee-loader!./example.coffee 308 bytes {0} [built] single entry coffee-loader!./example.coffee bundle - chunk {1} ./bundle-runtime-nosources-source-map.js, ./bundle-runtime-nosources-source-map.js.map (bundle-runtime) 0 bytes ={0}= [entry] [rendered] + chunk {1} ./runtime~bundle-nosources-source-map.js, ./runtime~bundle-nosources-source-map.js.map (runtime~bundle) 0 bytes ={0}= [entry] [rendered] > coffee-loader!./example.coffee bundle Child Hash: 0a1b2c3d4e5f6a7b8c9d Asset Size Chunks Chunk Names ./bundle-source-map.js 720 bytes 0 [emitted] bundle - ./bundle-runtime-source-map.js 4.99 KiB 1 [emitted] bundle-runtime - ./bundle-source-map.js.map 596 bytes 0 [emitted] bundle - ./bundle-runtime-source-map.js.map 5 KiB 1 [emitted] bundle-runtime - Entrypoint bundle = ./bundle-runtime-source-map.js ./bundle-runtime-source-map.js.map ./bundle-source-map.js ./bundle-source-map.js.map + ./runtime~bundle-source-map.js 4.99 KiB 1 [emitted] runtime~bundle + ./bundle-source-map.js.map 549 bytes 0 [emitted] bundle + ./runtime~bundle-source-map.js.map 4.95 KiB 1 [emitted] runtime~bundle + Entrypoint bundle = ./runtime~bundle-source-map.js ./runtime~bundle-source-map.js.map ./bundle-source-map.js ./bundle-source-map.js.map chunk {0} ./bundle-source-map.js, ./bundle-source-map.js.map (bundle) 308 bytes ={1}= [initial] [rendered] > coffee-loader!./example.coffee bundle [0] (webpack)/node_modules/coffee-loader!./example.coffee 308 bytes {0} [built] single entry coffee-loader!./example.coffee bundle - chunk {1} ./bundle-runtime-source-map.js, ./bundle-runtime-source-map.js.map (bundle-runtime) 0 bytes ={0}= [entry] [rendered] + chunk {1} ./runtime~bundle-source-map.js, ./runtime~bundle-source-map.js.map (runtime~bundle) 0 bytes ={0}= [entry] [rendered] > coffee-loader!./example.coffee bundle ``` diff --git a/examples/wasm-simple/README.md b/examples/wasm-simple/README.md index 27a1436b8..8f02e58f7 100644 --- a/examples/wasm-simple/README.md +++ b/examples/wasm-simple/README.md @@ -316,11 +316,11 @@ function timed(name, fn) { "use strict"; -// Instanciate WebAssembly module +// Instantiate WebAssembly module var instance = new WebAssembly.Instance(__webpack_require__.w[module.i], { }); -// export exports from WebAssmbly module +// export exports from WebAssembly module module.exports = instance.exports; /***/ }), @@ -371,11 +371,11 @@ function fibonacciJavascript(i) { "use strict"; -// Instanciate WebAssembly module +// Instantiate WebAssembly module var instance = new WebAssembly.Instance(__webpack_require__.w[module.i], { }); -// export exports from WebAssmbly module +// export exports from WebAssembly module module.exports = instance.exports; /***/ }), @@ -388,11 +388,11 @@ module.exports = instance.exports; "use strict"; -// Instanciate WebAssembly module +// Instantiate WebAssembly module var instance = new WebAssembly.Instance(__webpack_require__.w[module.i], { }); -// export exports from WebAssmbly module +// export exports from WebAssembly module module.exports = instance.exports; /***/ }) @@ -413,11 +413,11 @@ module.exports = instance.exports; "use strict"; -// Instanciate WebAssembly module +// Instantiate WebAssembly module var instance = new WebAssembly.Instance(__webpack_require__.w[module.i], { }); -// export exports from WebAssmbly module +// export exports from WebAssembly module module.exports = instance.exports; /***/ }) @@ -436,7 +436,7 @@ Version: webpack next 9c8c5b45b5c12888e105.wasm 41 bytes 0, 1 [emitted] 62df68d96f4aa17e7b77.wasm 67 bytes 0 [emitted] e5003c8310987c008228.wasm 62 bytes 0 [emitted] - 1.output.js 461 bytes 1 [emitted] + 1.output.js 462 bytes 1 [emitted] output.js 8.91 KiB 2 [emitted] main Entrypoint main = output.js chunk {0} 0.output.js, 9c8c5b45b5c12888e105.wasm, 62df68d96f4aa17e7b77.wasm, e5003c8310987c008228.wasm 585 bytes <{2}> [rendered] From df65475ba32a5881f48ab9d90e1c010ea57c3d65 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Sat, 10 Feb 2018 15:10:28 +0100 Subject: [PATCH 069/112] 4.0.0-beta.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9212f5e73..0e33b9bb5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "webpack", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "author": "Tobias Koppers @sokra", "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.", "license": "MIT", From bc840ec8747ba19c9e87629f2959ed2e65a9ffbe Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Sat, 10 Feb 2018 15:37:11 +0100 Subject: [PATCH 070/112] 3.11.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 86f8d1366..08d472085 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "webpack", - "version": "3.10.0", + "version": "3.11.0", "author": "Tobias Koppers @sokra", "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.", "dependencies": { From f01054664fbfcec425652d8d8f0d1472b9d6dbc8 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Sat, 10 Feb 2018 15:40:10 +0100 Subject: [PATCH 071/112] update examples --- examples/aggressive-merging/README.md | 12 +- examples/chunkhash/README.md | 26 ++--- examples/code-splitted-css-bundle/README.md | 6 +- .../README.md | 22 ++-- .../code-splitted-require.context/README.md | 20 ++-- .../code-splitting-bundle-loader/README.md | 14 +-- examples/code-splitting-harmony/README.md | 18 +-- .../README.md | 10 +- .../README.md | 14 +-- examples/code-splitting/README.md | 20 ++-- examples/coffee-script/README.md | 14 +-- .../common-chunk-and-vendor-chunk/README.md | 83 +++----------- examples/common-chunk-grandchildren/README.md | 48 ++++---- examples/commonjs/README.md | 10 +- examples/css-bundle/README.md | 8 +- .../dll-app-and-vendor/0-vendor/README.md | 6 +- examples/dll-app-and-vendor/1-app/README.md | 12 +- examples/dll-user/README.md | 28 ++--- examples/dll/README.md | 16 +-- examples/explicit-vendor-chunk/README.md | 26 ++--- examples/externals/README.md | 22 ++-- examples/extra-async-chunk-advanced/README.md | 26 ++--- examples/extra-async-chunk/README.md | 26 ++--- examples/harmony-interop/README.md | 12 +- examples/harmony-library/README.md | 10 +- examples/harmony-unused/README.md | 6 +- examples/harmony/README.md | 8 +- examples/http2-aggressive-splitting/README.md | 14 +-- examples/hybrid-routing/README.md | 30 ++--- examples/i18n/README.md | 16 +-- examples/loader/README.md | 14 +-- examples/mixed/README.md | 34 +++--- examples/move-to-parent/README.md | 26 ++--- examples/multi-compiler/README.md | 10 +- examples/multi-part-library/README.md | 20 ++-- examples/multiple-commons-chunks/README.md | 103 +++++------------- .../README.md | 16 +-- examples/multiple-entry-points/README.md | 24 ++-- examples/named-chunks/README.md | 26 ++--- examples/require.context/README.md | 16 +-- examples/require.resolve/README.md | 8 +- examples/scope-hoisting/README.md | 15 ++- examples/source-map/README.md | 58 +++++----- examples/two-explicit-vendor-chunks/README.md | 75 +++---------- examples/web-worker/README.md | 28 ++--- 45 files changed, 454 insertions(+), 602 deletions(-) diff --git a/examples/aggressive-merging/README.md b/examples/aggressive-merging/README.md index 771299719..e3c4e4d4b 100644 --- a/examples/aggressive-merging/README.md +++ b/examples/aggressive-merging/README.md @@ -57,13 +57,13 @@ module.exports = { ``` Hash: 75bcce350a8b5f748873 -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names 0.chunk.js 5.76 kB 0 [emitted] - 1.chunk.js 403 bytes 1 [emitted] -pageB.bundle.js 6.42 kB 2 [emitted] pageB -pageA.bundle.js 6.39 kB 3 [emitted] pageA -pageC.bundle.js 6.18 kB 4 [emitted] pageC + 1.chunk.js 405 bytes 1 [emitted] +pageB.bundle.js 6.43 kB 2 [emitted] pageB +pageA.bundle.js 6.42 kB 3 [emitted] pageA +pageC.bundle.js 6.19 kB 4 [emitted] pageC Entrypoint pageA = pageA.bundle.js Entrypoint pageB = pageB.bundle.js Entrypoint pageC = pageC.bundle.js @@ -102,7 +102,7 @@ chunk {4} pageC.bundle.js (pageC) 70 bytes [entry] [rendered] ``` Hash: 75bcce350a8b5f748873 -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names 0.chunk.js 75 bytes 0 [emitted] 1.chunk.js 78 bytes 1 [emitted] diff --git a/examples/chunkhash/README.md b/examples/chunkhash/README.md index f4cdfb210..fcdc028fa 100644 --- a/examples/chunkhash/README.md +++ b/examples/chunkhash/README.md @@ -62,7 +62,7 @@ module.exports = { @@ -98,7 +98,7 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /*!**********************!*\ !*** multi ./vendor ***! \**********************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -118,7 +118,7 @@ webpackJsonp([3],[ /*!********************!*\ !*** ./example.js ***! \********************/ -/*! exports provided: */ +/*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -140,14 +140,14 @@ __webpack_require__.e/* import() */(0).then(__webpack_require__.bind(null, /*! . ## Uncompressed ``` -Hash: 49023fec553882c3285c -Version: webpack 3.5.1 +Hash: be6b9171c119036aca2b +Version: webpack 3.11.0 Asset Size Chunks Chunk Names -3db3fdaf96bbdadce99a.js 238 bytes 0 [emitted] -7c1138cf80dd374c367e.js 238 bytes 1 [emitted] - common.[chunkhash].js 732 bytes 2 [emitted] common - main.[chunkhash].js 656 bytes 3 [emitted] main - manifest.[chunkhash].js 5.89 kB 4 [emitted] manifest +3db3fdaf96bbdadce99a.js 239 bytes 0 [emitted] +7c1138cf80dd374c367e.js 239 bytes 1 [emitted] + common.[chunkhash].js 733 bytes 2 [emitted] common + main.[chunkhash].js 657 bytes 3 [emitted] main + manifest.[chunkhash].js 5.83 kB 4 [emitted] manifest Entrypoint main = manifest.[chunkhash].js common.[chunkhash].js main.[chunkhash].js Entrypoint common = manifest.[chunkhash].js common.[chunkhash].js chunk {0} 3db3fdaf96bbdadce99a.js 29 bytes {3} [rendered] @@ -175,14 +175,14 @@ chunk {4} manifest.[chunkhash].js (manifest) 0 bytes [entry] [rendered] ## Minimized (uglify-js, no zip) ``` -Hash: 49023fec553882c3285c -Version: webpack 3.5.1 +Hash: be6b9171c119036aca2b +Version: webpack 3.11.0 Asset Size Chunks Chunk Names 3db3fdaf96bbdadce99a.js 38 bytes 0 [emitted] 7c1138cf80dd374c367e.js 38 bytes 1 [emitted] common.[chunkhash].js 150 bytes 2 [emitted] common main.[chunkhash].js 165 bytes 3 [emitted] main - manifest.[chunkhash].js 1.46 kB 4 [emitted] manifest + manifest.[chunkhash].js 1.41 kB 4 [emitted] manifest Entrypoint main = manifest.[chunkhash].js common.[chunkhash].js main.[chunkhash].js Entrypoint common = manifest.[chunkhash].js common.[chunkhash].js chunk {0} 3db3fdaf96bbdadce99a.js 29 bytes {3} [rendered] diff --git a/examples/code-splitted-css-bundle/README.md b/examples/code-splitted-css-bundle/README.md index 50f01bb7a..1552a655f 100644 --- a/examples/code-splitted-css-bundle/README.md +++ b/examples/code-splitted-css-bundle/README.md @@ -67,10 +67,10 @@ body { ``` Hash: 5be34b0d3c624e61c616 -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names ce21cbdd9b894e6af794813eb3fdaf60.png 119 bytes [emitted] - 0.output.js 2.43 kB 0 [emitted] + 0.output.js 2.44 kB 0 [emitted] output.js 21.2 kB 1 [emitted] main style.css 71 bytes 1 [emitted] main Entrypoint main = output.js style.css @@ -105,7 +105,7 @@ Child extract-text-webpack-plugin ../../node_modules/extract-text-webpack-plugin ``` Hash: edbe0e91ba86d814d855 -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names ce21cbdd9b894e6af794813eb3fdaf60.png 119 bytes [emitted] 0.output.js 343 bytes 0 [emitted] diff --git a/examples/code-splitted-require.context-amd/README.md b/examples/code-splitted-require.context-amd/README.md index 918be881b..48bf59e9f 100644 --- a/examples/code-splitted-require.context-amd/README.md +++ b/examples/code-splitted-require.context-amd/README.md @@ -99,7 +99,7 @@ getTemplate("b", function(b) { /******/ // start chunk loading /******/ var head = document.getElementsByTagName('head')[0]; /******/ var script = document.createElement('script'); -/******/ script.type = 'text/javascript'; +/******/ script.type = "text/javascript"; /******/ script.charset = 'utf-8'; /******/ script.async = true; /******/ script.timeout = 120000; @@ -176,14 +176,14 @@ getTemplate("b", function(b) { /*!********************!*\ !*** ./example.js ***! \********************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { function getTemplate(templateName, callback) { - __webpack_require__.e/* require */(0).then(function() { var __WEBPACK_AMD_REQUIRE_ARRAY__ = [__webpack_require__(/*! ../require.context/templates */ 1)("./"+templateName)]; (function(tmpl) { + __webpack_require__.e/* require */(0).then(function() { var __WEBPACK_AMD_REQUIRE_ARRAY__ = [__webpack_require__(/*! ../require.context/templates */ 1)("./"+templateName)]; ((function(tmpl) { callback(tmpl()); - }.apply(null, __WEBPACK_AMD_REQUIRE_ARRAY__));}).catch(__webpack_require__.oe); + }).apply(null, __WEBPACK_AMD_REQUIRE_ARRAY__));}).catch(__webpack_require__.oe); } getTemplate("a", function(a) { console.log(a); @@ -205,7 +205,7 @@ webpackJsonp([0],[ /*!*********************************************!*\ !*** ../require.context/templates ^\.\/.*$ ***! \*********************************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -238,7 +238,7 @@ webpackContext.id = 1; /*!*****************************************!*\ !*** ../require.context/templates/a.js ***! \*****************************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -251,7 +251,7 @@ module.exports = function() { /*!*****************************************!*\ !*** ../require.context/templates/b.js ***! \*****************************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -264,7 +264,7 @@ module.exports = function() { /*!*****************************************!*\ !*** ../require.context/templates/c.js ***! \*****************************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -282,9 +282,9 @@ module.exports = function() { ``` Hash: 1c46bbe47e8b8a0ee8e2 -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names -0.output.js 1.85 kB 0 [emitted] +0.output.js 1.86 kB 0 [emitted] output.js 6.37 kB 1 [emitted] main Entrypoint main = output.js chunk {0} 0.output.js 463 bytes {1} [rendered] @@ -309,7 +309,7 @@ chunk {1} output.js (main) 261 bytes [entry] [rendered] ``` Hash: 1c46bbe47e8b8a0ee8e2 -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names 0.output.js 544 bytes 0 [emitted] output.js 1.52 kB 1 [emitted] main diff --git a/examples/code-splitted-require.context/README.md b/examples/code-splitted-require.context/README.md index 3c431704d..ab6c080a4 100644 --- a/examples/code-splitted-require.context/README.md +++ b/examples/code-splitted-require.context/README.md @@ -99,7 +99,7 @@ getTemplate("b", function(b) { /******/ // start chunk loading /******/ var head = document.getElementsByTagName('head')[0]; /******/ var script = document.createElement('script'); -/******/ script.type = 'text/javascript'; +/******/ script.type = "text/javascript"; /******/ script.charset = 'utf-8'; /******/ script.async = true; /******/ script.timeout = 120000; @@ -176,7 +176,7 @@ getTemplate("b", function(b) { /*!********************!*\ !*** ./example.js ***! \********************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -205,7 +205,7 @@ webpackJsonp([0],[ /*!*********************************************!*\ !*** ../require.context/templates ^\.\/.*$ ***! \*********************************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -238,7 +238,7 @@ webpackContext.id = 1; /*!*****************************************!*\ !*** ../require.context/templates/a.js ***! \*****************************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -251,7 +251,7 @@ module.exports = function() { /*!*****************************************!*\ !*** ../require.context/templates/b.js ***! \*****************************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -264,7 +264,7 @@ module.exports = function() { /*!*****************************************!*\ !*** ../require.context/templates/c.js ***! \*****************************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -282,10 +282,10 @@ module.exports = function() { ``` Hash: f67ab883501eec17d2fb -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names -0.output.js 1.85 kB 0 [emitted] - output.js 6.3 kB 1 [emitted] main +0.output.js 1.86 kB 0 [emitted] + output.js 6.31 kB 1 [emitted] main Entrypoint main = output.js chunk {0} 0.output.js 463 bytes {1} [rendered] > [0] ./example.js 2:1-4:3 @@ -309,7 +309,7 @@ chunk {1} output.js (main) 276 bytes [entry] [rendered] ``` Hash: f67ab883501eec17d2fb -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names 0.output.js 544 bytes 0 [emitted] output.js 1.49 kB 1 [emitted] main diff --git a/examples/code-splitting-bundle-loader/README.md b/examples/code-splitting-bundle-loader/README.md index 8d19cbc4b..4dc326704 100644 --- a/examples/code-splitting-bundle-loader/README.md +++ b/examples/code-splitting-bundle-loader/README.md @@ -102,7 +102,7 @@ module.exports = "It works"; /******/ // start chunk loading /******/ var head = document.getElementsByTagName('head')[0]; /******/ var script = document.createElement('script'); -/******/ script.type = 'text/javascript'; +/******/ script.type = "text/javascript"; /******/ script.charset = 'utf-8'; /******/ script.async = true; /******/ script.timeout = 120000; @@ -179,7 +179,7 @@ module.exports = "It works"; /*!********************!*\ !*** ./example.js ***! \********************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -193,7 +193,7 @@ __webpack_require__(/*! bundle-loader!./file.js */ 1)(function(fileJsExports) { /*!******************************************************!*\ !*** (webpack)/node_modules/bundle-loader!./file.js ***! \******************************************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -225,7 +225,7 @@ webpackJsonp([0],{ /*!*****************!*\ !*** ./file.js ***! \*****************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -242,9 +242,9 @@ module.exports = "It works"; ``` Hash: 0f292e2adbe6929efd48 -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names -0.output.js 231 bytes 0 [emitted] +0.output.js 232 bytes 0 [emitted] output.js 6.73 kB 1 [emitted] main Entrypoint main = output.js chunk {0} 0.output.js 28 bytes {1} [rendered] @@ -262,7 +262,7 @@ chunk {1} output.js (main) 378 bytes [entry] [rendered] ``` Hash: 0f292e2adbe6929efd48 -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names 0.output.js 58 bytes 0 [emitted] output.js 1.55 kB 1 [emitted] main diff --git a/examples/code-splitting-harmony/README.md b/examples/code-splitting-harmony/README.md index 4c03bc9ec..bc699de8e 100644 --- a/examples/code-splitting-harmony/README.md +++ b/examples/code-splitting-harmony/README.md @@ -110,7 +110,7 @@ Promise.all([loadC("1"), loadC("2")]).then(function(arr) { /******/ // start chunk loading /******/ var head = document.getElementsByTagName('head')[0]; /******/ var script = document.createElement('script'); -/******/ script.type = 'text/javascript'; +/******/ script.type = "text/javascript"; /******/ script.charset = 'utf-8'; /******/ script.async = true; /******/ script.timeout = 120000; @@ -189,7 +189,7 @@ Promise.all([loadC("1"), loadC("2")]).then(function(arr) { /*!********************!*\ !*** ./example.js ***! \********************/ -/*! exports provided: */ +/*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -217,7 +217,7 @@ Promise.all([loadC("1"), loadC("2")]).then(function(arr) { /*!***************************!*\ !*** ./node_modules/a.js ***! \***************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /***/ (function(module, exports) { // module a @@ -227,7 +227,7 @@ Promise.all([loadC("1"), loadC("2")]).then(function(arr) { /*!**************************************!*\ !*** ./node_modules/c lazy ^\.\/.*$ ***! \**************************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -274,11 +274,11 @@ module.exports = webpackAsyncContext; ``` Hash: f2701c90a6d1597932b5 -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names -0.output.js 258 bytes 0 [emitted] -1.output.js 249 bytes 1 [emitted] -2.output.js 244 bytes 2 [emitted] +0.output.js 259 bytes 0 [emitted] +1.output.js 250 bytes 1 [emitted] +2.output.js 245 bytes 2 [emitted] output.js 7.55 kB 3 [emitted] main Entrypoint main = output.js chunk {0} 0.output.js 13 bytes {3} [rendered] @@ -301,7 +301,7 @@ chunk {3} output.js (main) 427 bytes [entry] [rendered] ``` Hash: f2701c90a6d1597932b5 -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names 0.output.js 37 bytes 0 [emitted] 1.output.js 36 bytes 1 [emitted] diff --git a/examples/code-splitting-native-import-context/README.md b/examples/code-splitting-native-import-context/README.md index e7786bcfa..3bcb3f95a 100644 --- a/examples/code-splitting-native-import-context/README.md +++ b/examples/code-splitting-native-import-context/README.md @@ -117,7 +117,7 @@ export default foo; /******/ // start chunk loading /******/ var head = document.getElementsByTagName('head')[0]; /******/ var script = document.createElement('script'); -/******/ script.type = 'text/javascript'; +/******/ script.type = "text/javascript"; /******/ script.charset = 'utf-8'; /******/ script.async = true; /******/ script.timeout = 120000; @@ -197,7 +197,7 @@ export default foo; /*!********************!*\ !*** ./example.js ***! \********************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -223,7 +223,7 @@ getTemplate("baz"); /*!*********************************!*\ !*** ./templates lazy ^\.\/.*$ ***! \*********************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -277,7 +277,7 @@ module.exports = webpackAsyncContext; ``` Hash: 6f07710827408f86ab81 -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names 0.output.js 444 bytes 0 [emitted] 1.output.js 450 bytes 1 [emitted] @@ -310,7 +310,7 @@ chunk {3} output.js (main) 456 bytes [entry] [rendered] ``` Hash: 6f07710827408f86ab81 -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names 0.output.js 117 bytes 0 [emitted] 1.output.js 116 bytes 1 [emitted] diff --git a/examples/code-splitting-specify-chunk-name/README.md b/examples/code-splitting-specify-chunk-name/README.md index 8b2fc93cf..64099318f 100644 --- a/examples/code-splitting-specify-chunk-name/README.md +++ b/examples/code-splitting-specify-chunk-name/README.md @@ -117,7 +117,7 @@ export default foo; /******/ // start chunk loading /******/ var head = document.getElementsByTagName('head')[0]; /******/ var script = document.createElement('script'); -/******/ script.type = 'text/javascript'; +/******/ script.type = "text/javascript"; /******/ script.charset = 'utf-8'; /******/ script.async = true; /******/ script.timeout = 120000; @@ -197,11 +197,11 @@ export default foo; /*!********************!*\ !*** ./example.js ***! \********************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__.e/* import() */(0/*! chunk-foo */).then(__webpack_require__.bind(null, /*! ./templates/foo */ 2)).then(function(foo) { +__webpack_require__.e/* import() */(0/*! chunk-foo *//* duplicate */).then(__webpack_require__.bind(null, /*! ./templates/foo */ 2)).then(function(foo) { console.log('foo:', foo); }) @@ -223,7 +223,7 @@ __webpack_require__(/*! ./templates */ 4)("./ba" + createContextVar).then(functi /*!***********************************!*\ !*** ./templates lazy ^\.\/ba.*$ ***! \***********************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -269,12 +269,12 @@ module.exports = webpackAsyncContext; ``` Hash: 9d034b3ada38a1291aa9 -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names 0.output.js 444 bytes 0 [emitted] chunk-foo 1.output.js 450 bytes 1 [emitted] chunk-bar-baz2 2.output.js 441 bytes 2 [emitted] chunk-bar-baz0 - output.js 7.3 kB 3 [emitted] main + output.js 7.32 kB 3 [emitted] main Entrypoint main = output.js chunk {0} 0.output.js (chunk-foo) 41 bytes {3} [rendered] > duplicate chunk-foo [3] ./example.js 1:0-62 @@ -304,7 +304,7 @@ chunk {3} output.js (main) 580 bytes [entry] [rendered] ``` Hash: 9d034b3ada38a1291aa9 -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names 0.output.js 117 bytes 0 [emitted] chunk-foo 1.output.js 116 bytes 1 [emitted] chunk-bar-baz2 diff --git a/examples/code-splitting/README.md b/examples/code-splitting/README.md index ea56da7dd..ee13dd7b3 100644 --- a/examples/code-splitting/README.md +++ b/examples/code-splitting/README.md @@ -121,7 +121,7 @@ require.ensure(["c"], function(require) { /******/ // start chunk loading /******/ var head = document.getElementsByTagName('head')[0]; /******/ var script = document.createElement('script'); -/******/ script.type = 'text/javascript'; +/******/ script.type = "text/javascript"; /******/ script.charset = 'utf-8'; /******/ script.async = true; /******/ script.timeout = 120000; @@ -198,7 +198,7 @@ require.ensure(["c"], function(require) { /*!***************************!*\ !*** ./node_modules/b.js ***! \***************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -209,7 +209,7 @@ require.ensure(["c"], function(require) { /*!********************!*\ !*** ./example.js ***! \********************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -225,7 +225,7 @@ __webpack_require__.e/* require.ensure */(0).then((function(require) { /*!***************************!*\ !*** ./node_modules/a.js ***! \***************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -246,7 +246,7 @@ webpackJsonp([0],[ /*!***************************!*\ !*** ./node_modules/c.js ***! \***************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -257,7 +257,7 @@ webpackJsonp([0],[ /*!***************************!*\ !*** ./node_modules/d.js ***! \***************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -279,10 +279,10 @@ webpackJsonp([0],[,,,function(n,c){},function(n,c){}]); ``` Hash: 6a2e963878a958fd1aca -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names -0.output.js 488 bytes 0 [emitted] - output.js 6.66 kB 1 [emitted] main +0.output.js 490 bytes 0 [emitted] + output.js 6.67 kB 1 [emitted] main Entrypoint main = output.js chunk {0} 0.output.js 22 bytes {1} [rendered] > [1] ./example.js 3:0-6:2 @@ -297,7 +297,7 @@ chunk {1} output.js (main) 166 bytes [entry] [rendered] ``` Hash: 6a2e963878a958fd1aca -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names 0.output.js 55 bytes 0 [emitted] output.js 1.45 kB 1 [emitted] main diff --git a/examples/coffee-script/README.md b/examples/coffee-script/README.md index be118ac76..7ac540e60 100644 --- a/examples/coffee-script/README.md +++ b/examples/coffee-script/README.md @@ -103,7 +103,7 @@ module.exports = 42 /*!*********************!*\ !*** ./cup2.coffee ***! \*********************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -117,7 +117,7 @@ module.exports = 42; /*!********************!*\ !*** ./example.js ***! \********************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -128,7 +128,7 @@ console.log(__webpack_require__(/*! ./cup1 */ 2)); /*!*********************!*\ !*** ./cup1.coffee ***! \*********************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -150,9 +150,9 @@ module.exports = { ``` Hash: 22e68923dcce75e38966 -Version: webpack 3.5.1 - Asset Size Chunks Chunk Names -output.js 3.29 kB 0 [emitted] main +Version: webpack 3.11.0 + Asset Size Chunks Chunk Names +output.js 3.3 kB 0 [emitted] main Entrypoint main = output.js chunk {0} output.js (main) 206 bytes [entry] [rendered] > main [1] ./example.js @@ -168,7 +168,7 @@ chunk {0} output.js (main) 206 bytes [entry] [rendered] ``` Hash: 22e68923dcce75e38966 -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names output.js 640 bytes 0 [emitted] main Entrypoint main = output.js diff --git a/examples/common-chunk-and-vendor-chunk/README.md b/examples/common-chunk-and-vendor-chunk/README.md index 5166915d6..8aaba12c0 100644 --- a/examples/common-chunk-and-vendor-chunk/README.md +++ b/examples/common-chunk-and-vendor-chunk/README.md @@ -128,55 +128,6 @@ module.exports = { /******/ return module.exports; /******/ } /******/ -/******/ // This file contains only the entry chunk. -/******/ // The chunk loading function for additional chunks -/******/ __webpack_require__.e = function requireEnsure(chunkId) { -/******/ var installedChunkData = installedChunks[chunkId]; -/******/ if(installedChunkData === 0) { -/******/ return new Promise(function(resolve) { resolve(); }); -/******/ } -/******/ -/******/ // a Promise means "currently loading". -/******/ if(installedChunkData) { -/******/ return installedChunkData[2]; -/******/ } -/******/ -/******/ // setup Promise in chunk cache -/******/ var promise = new Promise(function(resolve, reject) { -/******/ installedChunkData = installedChunks[chunkId] = [resolve, reject]; -/******/ }); -/******/ installedChunkData[2] = promise; -/******/ -/******/ // start chunk loading -/******/ var head = document.getElementsByTagName('head')[0]; -/******/ var script = document.createElement('script'); -/******/ script.type = 'text/javascript'; -/******/ script.charset = 'utf-8'; -/******/ script.async = true; -/******/ script.timeout = 120000; -/******/ -/******/ if (__webpack_require__.nc) { -/******/ script.setAttribute("nonce", __webpack_require__.nc); -/******/ } -/******/ script.src = __webpack_require__.p + "" + chunkId + ".js"; -/******/ var timeout = setTimeout(onScriptComplete, 120000); -/******/ script.onerror = script.onload = onScriptComplete; -/******/ function onScriptComplete() { -/******/ // avoid mem leaks in IE. -/******/ script.onerror = script.onload = null; -/******/ clearTimeout(timeout); -/******/ var chunk = installedChunks[chunkId]; -/******/ if(chunk !== 0) { -/******/ if(chunk) { -/******/ chunk[1](new Error('Loading chunk ' + chunkId + ' failed.')); -/******/ } -/******/ installedChunks[chunkId] = undefined; -/******/ } -/******/ }; -/******/ head.appendChild(script); -/******/ -/******/ return promise; -/******/ }; /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; @@ -229,7 +180,7 @@ module.exports = { /*!*********************************!*\ !*** multi ./vendor1 ./vendor2 ***! \*********************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -242,7 +193,7 @@ module.exports = __webpack_require__(/*! ./vendor2 */4); /*!********************!*\ !*** ./vendor1.js ***! \********************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -253,7 +204,7 @@ module.exports = "vendor1"; /*!********************!*\ !*** ./vendor2.js ***! \********************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -271,7 +222,7 @@ webpackJsonp([0],[ /*!*********************!*\ !*** ./utility2.js ***! \*********************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -282,7 +233,7 @@ module.exports = "utility2"; /*!*********************!*\ !*** ./utility3.js ***! \*********************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -301,7 +252,7 @@ webpackJsonp([1],{ /*!******************!*\ !*** ./pageA.js ***! \******************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -316,7 +267,7 @@ module.exports = "pageA"; /*!*********************!*\ !*** ./utility1.js ***! \*********************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -336,7 +287,7 @@ webpackJsonp([3],{ /*!******************!*\ !*** ./pageB.js ***! \******************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -359,7 +310,7 @@ webpackJsonp([2],{ /*!******************!*\ !*** ./pageC.js ***! \******************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -379,13 +330,13 @@ module.exports = "pageC"; ``` Hash: 3b80b7c17398c31e4705 -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names -common.js 459 bytes 0 [emitted] common - pageA.js 595 bytes 1 [emitted] pageA - pageC.js 374 bytes 2 [emitted] pageC - pageB.js 374 bytes 3 [emitted] pageB -vendor.js 6.7 kB 4 [emitted] vendor +common.js 461 bytes 0 [emitted] common + pageA.js 597 bytes 1 [emitted] pageA + pageC.js 375 bytes 2 [emitted] pageC + pageB.js 375 bytes 3 [emitted] pageB +vendor.js 4.77 kB 4 [emitted] vendor Entrypoint vendor = vendor.js Entrypoint pageA = vendor.js common.js pageA.js Entrypoint pageB = vendor.js common.js pageB.js @@ -422,13 +373,13 @@ chunk {4} vendor.js (vendor) 94 bytes [entry] [rendered] ``` Hash: 3b80b7c17398c31e4705 -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names common.js 92 bytes 0 [emitted] common pageA.js 109 bytes 1 [emitted] pageA pageC.js 71 bytes 2 [emitted] pageC pageB.js 71 bytes 3 [emitted] pageB -vendor.js 1.48 kB 4 [emitted] vendor +vendor.js 918 bytes 4 [emitted] vendor Entrypoint vendor = vendor.js Entrypoint pageA = vendor.js common.js pageA.js Entrypoint pageB = vendor.js common.js pageB.js diff --git a/examples/common-chunk-grandchildren/README.md b/examples/common-chunk-grandchildren/README.md index 3ee56bfb6..b8be0d6af 100644 --- a/examples/common-chunk-grandchildren/README.md +++ b/examples/common-chunk-grandchildren/README.md @@ -210,7 +210,7 @@ module.exports = [ /******/ // start chunk loading /******/ var head = document.getElementsByTagName('head')[0]; /******/ var script = document.createElement('script'); -/******/ script.type = 'text/javascript'; +/******/ script.type = "text/javascript"; /******/ script.charset = 'utf-8'; /******/ script.async = true; /******/ script.timeout = 120000; @@ -287,7 +287,7 @@ module.exports = [ /*!**************************!*\ !*** multi ./example.js ***! \**************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -299,7 +299,7 @@ module.exports = __webpack_require__(/*! ./example.js */1); /*!********************!*\ !*** ./example.js ***! \********************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -323,7 +323,7 @@ main(); /*!******************************!*\ !*** ./reusableComponent.js ***! \******************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -345,7 +345,7 @@ webpackJsonp([0],{ /*!******************!*\ !*** ./pageC.js ***! \******************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -371,7 +371,7 @@ webpackJsonp([1],{ /*!******************!*\ !*** ./pageB.js ***! \******************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -398,7 +398,7 @@ webpackJsonp([2],{ /*!******************!*\ !*** ./pageA.js ***! \******************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -498,7 +498,7 @@ module.exports = function() { /******/ // start chunk loading /******/ var head = document.getElementsByTagName('head')[0]; /******/ var script = document.createElement('script'); -/******/ script.type = 'text/javascript'; +/******/ script.type = "text/javascript"; /******/ script.charset = 'utf-8'; /******/ script.async = true; /******/ script.timeout = 120000; @@ -570,7 +570,7 @@ module.exports = function() { /*!**************************!*\ !*** multi ./example.js ***! \**************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -582,7 +582,7 @@ module.exports = __webpack_require__(/*! ./example.js */1); /*!********************!*\ !*** ./example.js ***! \********************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -614,7 +614,7 @@ webpackJsonp([0],{ /*!******************************!*\ !*** ./reusableComponent.js ***! \******************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -637,7 +637,7 @@ webpackJsonp([1],{ /*!******************!*\ !*** ./pageB.js ***! \******************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -664,7 +664,7 @@ webpackJsonp([2],{ /*!******************!*\ !*** ./pageA.js ***! \******************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -690,7 +690,7 @@ webpackJsonp([3],{ /*!******************!*\ !*** ./pageC.js ***! \******************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -713,13 +713,13 @@ module.exports = function() { ``` Hash: 777f989f517d7831d56f1d268f47bc8703ad9f73 -Version: webpack 3.6.0 +Version: webpack 3.11.0 Child Hash: 777f989f517d7831d56f Asset Size Chunks Chunk Names - 0.output.js 388 bytes 0 [emitted] - 1.output.js 481 bytes 1 [emitted] - 2.output.js 388 bytes 2 [emitted] + 0.output.js 389 bytes 0 [emitted] + 1.output.js 482 bytes 1 [emitted] + 2.output.js 389 bytes 2 [emitted] output.js 6.95 kB 3 [emitted] main Entrypoint main = output.js chunk {0} 0.output.js 142 bytes {3} [rendered] @@ -745,11 +745,11 @@ Child Child Hash: 1d268f47bc8703ad9f73 Asset Size Chunks Chunk Names - 0.asyncoutput.js 314 bytes 0 [emitted] - 1.asyncoutput.js 522 bytes 1 [emitted] - 2.asyncoutput.js 388 bytes 2 [emitted] - 3.asyncoutput.js 388 bytes 3 [emitted] - asyncoutput.js 6.7 kB 4 [emitted] main + 0.asyncoutput.js 315 bytes 0 [emitted] + 1.asyncoutput.js 523 bytes 1 [emitted] + 2.asyncoutput.js 389 bytes 2 [emitted] + 3.asyncoutput.js 389 bytes 3 [emitted] + asyncoutput.js 6.71 kB 4 [emitted] main Entrypoint main = asyncoutput.js chunk {0} 0.asyncoutput.js 72 bytes {4} [rendered] > async commons [1] ./example.js 3:1-6:3 @@ -780,7 +780,7 @@ Child ``` Hash: 777f989f517d7831d56f1d268f47bc8703ad9f73 -Version: webpack 3.6.0 +Version: webpack 3.11.0 Child Hash: 777f989f517d7831d56f Asset Size Chunks Chunk Names diff --git a/examples/commonjs/README.md b/examples/commonjs/README.md index 46766fcd7..42d20a67c 100644 --- a/examples/commonjs/README.md +++ b/examples/commonjs/README.md @@ -115,7 +115,7 @@ exports.add = function() { /*!********************!*\ !*** ./example.js ***! \********************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -128,7 +128,7 @@ inc(a); // 2 /*!**********************!*\ !*** ./increment.js ***! \**********************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -142,7 +142,7 @@ exports.increment = function(val) { /*!*****************!*\ !*** ./math.js ***! \*****************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -164,7 +164,7 @@ exports.add = function() { ``` Hash: 9407d8cd068b1845b368 -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names output.js 3.39 kB 0 [emitted] main Entrypoint main = output.js @@ -181,7 +181,7 @@ chunk {0} output.js (main) 329 bytes [entry] [rendered] ``` Hash: 9407d8cd068b1845b368 -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names output.js 672 bytes 0 [emitted] main Entrypoint main = output.js diff --git a/examples/css-bundle/README.md b/examples/css-bundle/README.md index 565abb02f..62021ffc8 100644 --- a/examples/css-bundle/README.md +++ b/examples/css-bundle/README.md @@ -118,7 +118,7 @@ module.exports = { /*!********************!*\ !*** ./example.js ***! \********************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -129,7 +129,7 @@ __webpack_require__(/*! ./style.css */ 1); /*!*******************!*\ !*** ./style.css ***! \*******************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -153,7 +153,7 @@ body { ``` Hash: d3955970c7b0655c299a -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names ce21cbdd9b894e6af794813eb3fdaf60.png 119 bytes [emitted] output.js 2.9 kB 0 [emitted] main @@ -180,7 +180,7 @@ Child extract-text-webpack-plugin ../../node_modules/extract-text-webpack-plugin ``` Hash: 7e35402b768b90e83df1 -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names ce21cbdd9b894e6af794813eb3fdaf60.png 119 bytes [emitted] output.js 504 bytes 0 [emitted] main diff --git a/examples/dll-app-and-vendor/0-vendor/README.md b/examples/dll-app-and-vendor/0-vendor/README.md index 1331b6b14..d2eabfd25 100644 --- a/examples/dll-app-and-vendor/0-vendor/README.md +++ b/examples/dll-app-and-vendor/0-vendor/README.md @@ -120,7 +120,7 @@ var vendor_lib_6b1edee0549eb5092709 = /*!****************!*\ !*** dll main ***! \****************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -159,7 +159,7 @@ function square(n) { ``` Hash: 6b1edee0549eb5092709 -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names vendor.js 3.18 kB 0 [emitted] main Entrypoint main = vendor.js @@ -173,7 +173,7 @@ chunk {0} vendor.js (main) 60 bytes [entry] [rendered] ``` Hash: 6b1edee0549eb5092709 -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names vendor.js 652 bytes 0 [emitted] main Entrypoint main = vendor.js diff --git a/examples/dll-app-and-vendor/1-app/README.md b/examples/dll-app-and-vendor/1-app/README.md index 3a77b1ae7..b0947ab7e 100644 --- a/examples/dll-app-and-vendor/1-app/README.md +++ b/examples/dll-app-and-vendor/1-app/README.md @@ -125,7 +125,7 @@ console.log(new square(7)); /*!************************!*\ !*** ./example-app.js ***! \************************/ -/*! exports provided: */ +/*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -154,7 +154,7 @@ module.exports = (__webpack_require__(2))(1); /*!**************************************************!*\ !*** external "vendor_lib_6b1edee0549eb5092709" ***! \**************************************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -169,8 +169,8 @@ module.exports = vendor_lib_6b1edee0549eb5092709; ## Uncompressed ``` -Hash: 26778169dabaf1f3965d -Version: webpack 3.5.1 +Hash: 7067963043e156e8b20c +Version: webpack 3.11.0 Asset Size Chunks Chunk Names app.js 3.85 kB 0 [emitted] main Entrypoint main = app.js @@ -187,8 +187,8 @@ chunk {0} app.js (main) 182 bytes [entry] [rendered] ## Minimized (uglify-js, no zip) ``` -Hash: 26778169dabaf1f3965d -Version: webpack 3.5.1 +Hash: 7067963043e156e8b20c +Version: webpack 3.11.0 Asset Size Chunks Chunk Names app.js 710 bytes 0 [emitted] main Entrypoint main = app.js diff --git a/examples/dll-user/README.md b/examples/dll-user/README.md index 44d8db004..1d366f10f 100644 --- a/examples/dll-user/README.md +++ b/examples/dll-user/README.md @@ -117,7 +117,7 @@ console.log(require("module")); /*!*********************************************!*\ !*** external "alpha_457b6718a3ff9f8c2d77" ***! \*********************************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -128,7 +128,7 @@ module.exports = alpha_457b6718a3ff9f8c2d77; /*!********************************************!*\ !*** external "beta_457b6718a3ff9f8c2d77" ***! \********************************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -139,7 +139,7 @@ module.exports = beta_457b6718a3ff9f8c2d77; /*!********************!*\ !*** ./example.js ***! \********************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -158,7 +158,7 @@ console.log(__webpack_require__(/*! module */ 8)); /*!**************************************************************************!*\ !*** delegated ./alpha.js from dll-reference alpha_457b6718a3ff9f8c2d77 ***! \**************************************************************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -169,7 +169,7 @@ module.exports = (__webpack_require__(0))(1); /*!**********************************************************************!*\ !*** delegated ./a.js from dll-reference alpha_457b6718a3ff9f8c2d77 ***! \**********************************************************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -180,7 +180,7 @@ module.exports = (__webpack_require__(0))(2); /*!************************************************************************!*\ !*** delegated ./beta.js from dll-reference beta_457b6718a3ff9f8c2d77 ***! \************************************************************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -191,7 +191,7 @@ module.exports = (__webpack_require__(1))(5); /*!*********************************************************************!*\ !*** delegated ./b.js from dll-reference beta_457b6718a3ff9f8c2d77 ***! \*********************************************************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -202,7 +202,7 @@ module.exports = (__webpack_require__(1))(6); /*!**********************************************************************!*\ !*** delegated ./c.jsx from dll-reference beta_457b6718a3ff9f8c2d77 ***! \**********************************************************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -213,7 +213,7 @@ module.exports = (__webpack_require__(1))(7); /*!*****************************************************************************************!*\ !*** delegated ../node_modules/module.js from dll-reference alpha_457b6718a3ff9f8c2d77 ***! \*****************************************************************************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -228,10 +228,10 @@ module.exports = (__webpack_require__(0))(3); ## Uncompressed ``` -Hash: 60ca229a9df08630fded -Version: webpack 3.5.1 +Hash: 9465b8f83bfdde21e34b +Version: webpack 3.11.0 Asset Size Chunks Chunk Names -output.js 6.06 kB 0 [emitted] main +output.js 6.07 kB 0 [emitted] main Entrypoint main = output.js chunk {0} output.js (main) 549 bytes [entry] [rendered] > main [2] ./example.js @@ -254,8 +254,8 @@ chunk {0} output.js (main) 549 bytes [entry] [rendered] ## Minimized (uglify-js, no zip) ``` -Hash: 60ca229a9df08630fded -Version: webpack 3.5.1 +Hash: 9465b8f83bfdde21e34b +Version: webpack 3.11.0 Asset Size Chunks Chunk Names output.js 904 bytes 0 [emitted] main Entrypoint main = output.js diff --git a/examples/dll/README.md b/examples/dll/README.md index 4896769e6..697004d3a 100644 --- a/examples/dll/README.md +++ b/examples/dll/README.md @@ -115,7 +115,7 @@ var alpha_457b6718a3ff9f8c2d77 = /*!*****************!*\ !*** dll alpha ***! \*****************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -126,7 +126,7 @@ module.exports = __webpack_require__; /*!******************!*\ !*** ./alpha.js ***! \******************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -137,7 +137,7 @@ module.exports = "alpha"; /*!**************!*\ !*** ./a.js ***! \**************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -148,7 +148,7 @@ module.exports = "a"; /*!*********************************!*\ !*** ../node_modules/module.js ***! \*********************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -170,10 +170,10 @@ module.exports = "module"; ``` Hash: 457b6718a3ff9f8c2d77 -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names - MyDll.beta.js 3.31 kB 0 [emitted] beta -MyDll.alpha.js 3.34 kB 1 [emitted] alpha + MyDll.beta.js 3.32 kB 0 [emitted] beta +MyDll.alpha.js 3.35 kB 1 [emitted] alpha Entrypoint alpha = MyDll.alpha.js Entrypoint beta = MyDll.beta.js chunk {0} MyDll.beta.js (beta) 80 bytes [entry] [rendered] @@ -199,7 +199,7 @@ chunk {1} MyDll.alpha.js (alpha) 84 bytes [entry] [rendered] ``` Hash: 457b6718a3ff9f8c2d77 -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names MyDll.beta.js 627 bytes 0 [emitted] beta MyDll.alpha.js 628 bytes 1 [emitted] alpha diff --git a/examples/explicit-vendor-chunk/README.md b/examples/explicit-vendor-chunk/README.md index 05644175c..825755504 100644 --- a/examples/explicit-vendor-chunk/README.md +++ b/examples/explicit-vendor-chunk/README.md @@ -123,7 +123,7 @@ var vendor_3e23dee019354f6a37c0 = /*!****************!*\ !*** dll main ***! \****************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -134,7 +134,7 @@ module.exports = __webpack_require__; /*!*******************!*\ !*** ./vendor.js ***! \*******************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -145,7 +145,7 @@ module.exports = "Vendor"; /*!********************!*\ !*** ./vendor2.js ***! \********************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -228,7 +228,7 @@ module.exports = "Vendor2"; /*!**********************************************!*\ !*** external "vendor_3e23dee019354f6a37c0" ***! \**********************************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -239,7 +239,7 @@ module.exports = vendor_3e23dee019354f6a37c0; /*!******************!*\ !*** ./pageA.js ***! \******************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -251,7 +251,7 @@ module.exports = "pageA"; /*!****************************************************************************!*\ !*** delegated ./vendor.js from dll-reference vendor_3e23dee019354f6a37c0 ***! \****************************************************************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -266,12 +266,12 @@ module.exports = (__webpack_require__(0))(1); ## Uncompressed ``` -Hash: 3e23dee019354f6a37c0873a025592bd40b1b4d6 -Version: webpack 3.5.1 +Hash: 3e23dee019354f6a37c024ad466aeda02c32e5a7 +Version: webpack 3.11.0 Child vendor: Hash: 3e23dee019354f6a37c0 Asset Size Chunks Chunk Names - vendor.js 3.11 kB 0 [emitted] main + vendor.js 3.12 kB 0 [emitted] main Entrypoint main = vendor.js chunk {0} vendor.js (main) 65 bytes [entry] [rendered] > main [0] dll main @@ -281,7 +281,7 @@ Child vendor: [2] ./vendor2.js 27 bytes {0} [built] single entry ./vendor2 [0] dll main main:1 Child app: - Hash: 873a025592bd40b1b4d6 + Hash: 24ad466aeda02c32e5a7 Asset Size Chunks Chunk Names pageB.js 3.46 kB 0 [emitted] pageB pageA.js 3.44 kB 1 [emitted] pageA @@ -309,8 +309,8 @@ Child app: ## Minimized (uglify-js, no zip) ``` -Hash: 3e23dee019354f6a37c0873a025592bd40b1b4d6 -Version: webpack 3.5.1 +Hash: 3e23dee019354f6a37c024ad466aeda02c32e5a7 +Version: webpack 3.11.0 Child vendor: Hash: 3e23dee019354f6a37c0 Asset Size Chunks Chunk Names @@ -324,7 +324,7 @@ Child vendor: [2] ./vendor2.js 27 bytes {0} [built] single entry ./vendor2 [0] dll main main:1 Child app: - Hash: 873a025592bd40b1b4d6 + Hash: 24ad466aeda02c32e5a7 Asset Size Chunks Chunk Names pageB.js 609 bytes 0 [emitted] pageB pageA.js 607 bytes 1 [emitted] pageA diff --git a/examples/externals/README.md b/examples/externals/README.md index 6e7649c7b..c5a3d6cb1 100644 --- a/examples/externals/README.md +++ b/examples/externals/README.md @@ -57,7 +57,7 @@ module.exports = { var a = typeof exports === 'object' ? factory(require("add"), require("./math")["subtract"]) : factory(root["add"], root["subtract"]); for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i]; } -})(this, function(__WEBPACK_EXTERNAL_MODULE_1__, __WEBPACK_EXTERNAL_MODULE_2__) { +})(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE_1__, __WEBPACK_EXTERNAL_MODULE_2__) { ```
return /******/ (function(modules) { /* webpackBootstrap */ }) @@ -137,7 +137,7 @@ return /******/ (function(modules) { // webpackBootstrap /*!********************!*\ !*** ./example.js ***! \********************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -151,7 +151,7 @@ exports.exampleValue = subtract(add(42, 2), 2); /*!**********************!*\ !*** external "add" ***! \**********************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -162,7 +162,7 @@ module.exports = __WEBPACK_EXTERNAL_MODULE_1__; /*!***************************************************************************************************************!*\ !*** external {"root":"subtract","commonjs2":"./subtract","commonjs":["./math","subtract"],"amd":"subtract"} ***! \***************************************************************************************************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -178,10 +178,10 @@ module.exports = __WEBPACK_EXTERNAL_MODULE_2__; ## Uncompressed ``` -Hash: b21d422ed5d9ade3ed36 -Version: webpack 3.5.1 +Hash: 32fda911d1e8acb2b888 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names -output.js 4.13 kB 0 [emitted] main +output.js 4.17 kB 0 [emitted] main Entrypoint main = output.js chunk {0} output.js (main) 197 bytes [entry] [rendered] > main [0] ./example.js @@ -192,10 +192,10 @@ chunk {0} output.js (main) 197 bytes [entry] [rendered] ## Minimized (uglify-js, no zip) ``` -Hash: b21d422ed5d9ade3ed36 -Version: webpack 3.5.1 - Asset Size Chunks Chunk Names -output.js 978 bytes 0 [emitted] main +Hash: 32fda911d1e8acb2b888 +Version: webpack 3.11.0 + Asset Size Chunks Chunk Names +output.js 1.01 kB 0 [emitted] main Entrypoint main = output.js chunk {0} output.js (main) 197 bytes [entry] [rendered] > main [0] ./example.js diff --git a/examples/extra-async-chunk-advanced/README.md b/examples/extra-async-chunk-advanced/README.md index ca061d547..47ed511df 100644 --- a/examples/extra-async-chunk-advanced/README.md +++ b/examples/extra-async-chunk-advanced/README.md @@ -129,7 +129,7 @@ module.exports = { /******/ // start chunk loading /******/ var head = document.getElementsByTagName('head')[0]; /******/ var script = document.createElement('script'); -/******/ script.type = 'text/javascript'; +/******/ script.type = "text/javascript"; /******/ script.charset = 'utf-8'; /******/ script.async = true; /******/ script.timeout = 120000; @@ -207,11 +207,11 @@ module.exports = { /*!********************!*\ !*** ./example.js ***! \********************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { -Promise.all/* require */([__webpack_require__.e(4), __webpack_require__.e(0), __webpack_require__.e(1)]).then(function() { var __WEBPACK_AMD_REQUIRE_ARRAY__ = [__webpack_require__(/*! ./a */ 0), __webpack_require__(/*! ./b */ 1), __webpack_require__(/*! ./c */ 3)]; (function(a, b, c) {}.apply(null, __WEBPACK_AMD_REQUIRE_ARRAY__));}).catch(__webpack_require__.oe); +Promise.all/* require */([__webpack_require__.e(4), __webpack_require__.e(0), __webpack_require__.e(1)]).then(function() { var __WEBPACK_AMD_REQUIRE_ARRAY__ = [__webpack_require__(/*! ./a */ 0), __webpack_require__(/*! ./b */ 1), __webpack_require__(/*! ./c */ 3)]; ((function(a, b, c) {}).apply(null, __WEBPACK_AMD_REQUIRE_ARRAY__));}).catch(__webpack_require__.oe); Promise.all/* require.ensure */([__webpack_require__.e(3), __webpack_require__.e(0), __webpack_require__.e(1)]).then((function(require) { __webpack_require__(/*! ./b */ 1); @@ -240,16 +240,16 @@ Promise.all/* require.ensure */([__webpack_require__.e(2), __webpack_require__.e ``` Hash: 37a3748d37b36bc162d0 -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names -0.output.js 221 bytes 0 [emitted] async2 -1.output.js 212 bytes 1 [emitted] async1 -2.output.js 215 bytes 2 [emitted] -3.output.js 215 bytes 3 [emitted] -4.output.js 215 bytes 4 [emitted] -5.output.js 215 bytes 5 [emitted] -6.output.js 215 bytes 6 [emitted] - output.js 7.22 kB 7 [emitted] main +0.output.js 222 bytes 0 [emitted] async2 +1.output.js 213 bytes 1 [emitted] async1 +2.output.js 216 bytes 2 [emitted] +3.output.js 216 bytes 3 [emitted] +4.output.js 216 bytes 4 [emitted] +5.output.js 216 bytes 5 [emitted] +6.output.js 216 bytes 6 [emitted] + output.js 7.23 kB 7 [emitted] main Entrypoint main = output.js chunk {0} 0.output.js (async2) 21 bytes {2} {7} [rendered] > async commons duplicate [2] ./example.js 1:0-52 @@ -299,7 +299,7 @@ chunk {7} output.js (main) 362 bytes [entry] [rendered] ``` Hash: 37a3748d37b36bc162d0 -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names 0.output.js 50 bytes 0 [emitted] async2 1.output.js 49 bytes 1 [emitted] async1 diff --git a/examples/extra-async-chunk/README.md b/examples/extra-async-chunk/README.md index 26fd79b6a..1136b6c44 100644 --- a/examples/extra-async-chunk/README.md +++ b/examples/extra-async-chunk/README.md @@ -149,7 +149,7 @@ module.exports = { /******/ // start chunk loading /******/ var head = document.getElementsByTagName('head')[0]; /******/ var script = document.createElement('script'); -/******/ script.type = 'text/javascript'; +/******/ script.type = "text/javascript"; /******/ script.charset = 'utf-8'; /******/ script.async = true; /******/ script.timeout = 120000; @@ -227,12 +227,12 @@ module.exports = { /*!********************!*\ !*** ./example.js ***! \********************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { // a chunks with a, b, c -Promise.all/* require */([__webpack_require__.e(0), __webpack_require__.e(2)]).then(function() { var __WEBPACK_AMD_REQUIRE_ARRAY__ = [__webpack_require__(/*! ./a */ 0), __webpack_require__(/*! ./b */ 1), __webpack_require__(/*! ./c */ 3)]; (function(a, b, c) {}.apply(null, __WEBPACK_AMD_REQUIRE_ARRAY__));}).catch(__webpack_require__.oe); +Promise.all/* require */([__webpack_require__.e(0), __webpack_require__.e(2)]).then(function() { var __WEBPACK_AMD_REQUIRE_ARRAY__ = [__webpack_require__(/*! ./a */ 0), __webpack_require__(/*! ./b */ 1), __webpack_require__(/*! ./c */ 3)]; ((function(a, b, c) {}).apply(null, __WEBPACK_AMD_REQUIRE_ARRAY__));}).catch(__webpack_require__.oe); // a chunk with a, b, d Promise.all/* require.ensure */([__webpack_require__.e(0), __webpack_require__.e(1)]).then((function(require) { @@ -254,7 +254,7 @@ webpackJsonp([0],[ /*!**************!*\ !*** ./a.js ***! \**************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -265,7 +265,7 @@ module.exports = "a"; /*!**************!*\ !*** ./b.js ***! \**************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -284,7 +284,7 @@ webpackJsonp([1],{ /*!**************!*\ !*** ./d.js ***! \**************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -304,7 +304,7 @@ webpackJsonp([2],{ /*!**************!*\ !*** ./c.js ***! \**************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -321,12 +321,12 @@ module.exports = "c"; ``` Hash: ca87dc9e54fc3309c0fd -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names -0.output.js 403 bytes 0 [emitted] -1.output.js 215 bytes 1 [emitted] -2.output.js 215 bytes 2 [emitted] - output.js 6.56 kB 3 [emitted] main +0.output.js 405 bytes 0 [emitted] +1.output.js 216 bytes 1 [emitted] +2.output.js 216 bytes 2 [emitted] + output.js 6.57 kB 3 [emitted] main Entrypoint main = output.js chunk {0} 0.output.js 42 bytes {3} [rendered] > async commons [2] ./example.js 2:0-52 @@ -354,7 +354,7 @@ chunk {3} output.js (main) 194 bytes [entry] [rendered] ``` Hash: ca87dc9e54fc3309c0fd -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names 0.output.js 78 bytes 0 [emitted] 1.output.js 51 bytes 1 [emitted] diff --git a/examples/harmony-interop/README.md b/examples/harmony-interop/README.md index 5a82efe7d..ececeacf3 100644 --- a/examples/harmony-interop/README.md +++ b/examples/harmony-interop/README.md @@ -144,7 +144,7 @@ export var named = "named"; /*!***************!*\ !*** ./fs.js ***! \***************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! exports used: default, readFile */ /***/ (function(module, exports) { @@ -162,7 +162,7 @@ exports.readFile = function() {}; /*!********************!*\ !*** ./example.js ***! \********************/ -/*! exports provided: */ +/*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -196,7 +196,7 @@ Object(__WEBPACK_IMPORTED_MODULE_1__reexport_commonjs__["readFile"])("file"); /*!******************************!*\ !*** ./reexport-commonjs.js ***! \******************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! exports used: readFile */ /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -218,7 +218,7 @@ Object(__WEBPACK_IMPORTED_MODULE_1__reexport_commonjs__["readFile"])("file"); /*!*********************!*\ !*** ./example2.js ***! \*********************/ -/*! no static exports found */ +/*! dynamic exports provided */ /***/ (function(module, exports, __webpack_require__) { // CommonJs module @@ -257,7 +257,7 @@ var named = "named"; ``` Hash: 756e5e3b676506d280a4 -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names output.js 6.13 kB 0 [emitted] main Entrypoint main = output.js @@ -286,7 +286,7 @@ chunk {0} output.js (main) 1.2 kB [entry] [rendered] ``` Hash: 756e5e3b676506d280a4 -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names output.js 1.03 kB 0 [emitted] main Entrypoint main = output.js diff --git a/examples/harmony-library/README.md b/examples/harmony-library/README.md index 12af23145..68e2656e3 100644 --- a/examples/harmony-library/README.md +++ b/examples/harmony-library/README.md @@ -25,7 +25,7 @@ module.exports = { exports["MyLibrary"] = factory(); else root["MyLibrary"] = factory(); -})(this, function() { +})(typeof self !== 'undefined' ? self : this, function() { ```
return /******/ (function(modules) { /* webpackBootstrap */ }) @@ -131,9 +131,9 @@ function increment() { ``` Hash: 0b2bf5443af50d14e1e0 -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names -MyLibrary.umd.js 3.45 kB 0 [emitted] main +MyLibrary.umd.js 3.49 kB 0 [emitted] main Entrypoint main = MyLibrary.umd.js chunk {0} MyLibrary.umd.js (main) 97 bytes [entry] [rendered] > main [0] ./example.js @@ -145,9 +145,9 @@ chunk {0} MyLibrary.umd.js (main) 97 bytes [entry] [rendered] ``` Hash: 0b2bf5443af50d14e1e0 -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names -MyLibrary.umd.js 872 bytes 0 [emitted] main +MyLibrary.umd.js 902 bytes 0 [emitted] main Entrypoint main = MyLibrary.umd.js chunk {0} MyLibrary.umd.js (main) 97 bytes [entry] [rendered] > main [0] ./example.js diff --git a/examples/harmony-unused/README.md b/examples/harmony-unused/README.md index 099c9a508..bbbeb822b 100644 --- a/examples/harmony-unused/README.md +++ b/examples/harmony-unused/README.md @@ -161,7 +161,7 @@ function list() { /*!********************!*\ !*** ./example.js ***! \********************/ -/*! exports provided: */ +/*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -229,7 +229,7 @@ function c() { console.log("c"); } ``` Hash: 4cac4181f66e42d03af9 -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names output.js 5.02 kB 0 [emitted] main Entrypoint main = output.js @@ -256,7 +256,7 @@ chunk {0} output.js (main) 726 bytes [entry] [rendered] ``` Hash: 4cac4181f66e42d03af9 -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names output.js 895 bytes 0 [emitted] main Entrypoint main = output.js diff --git a/examples/harmony/README.md b/examples/harmony/README.md index 17a791bd2..468aafb83 100644 --- a/examples/harmony/README.md +++ b/examples/harmony/README.md @@ -106,7 +106,7 @@ export function increment(val) { /******/ // start chunk loading /******/ var head = document.getElementsByTagName('head')[0]; /******/ var script = document.createElement('script'); -/******/ script.type = 'text/javascript'; +/******/ script.type = "text/javascript"; /******/ script.charset = 'utf-8'; /******/ script.async = true; /******/ script.timeout = 120000; @@ -183,7 +183,7 @@ export function increment(val) { /*!********************!*\ !*** ./example.js ***! \********************/ -/*! exports provided: */ +/*! no exports provided */ /*! all exports used */ /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -248,7 +248,7 @@ function add() { ``` Hash: f5982ea38c08a86ed265 -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names 0.output.js 484 bytes 0 [emitted] output.js 7.36 kB 1 [emitted] main @@ -276,7 +276,7 @@ chunk {1} output.js (main) 419 bytes [entry] [rendered] ``` Hash: f5982ea38c08a86ed265 -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names 0.output.js 147 bytes 0 [emitted] output.js 1.69 kB 1 [emitted] main diff --git a/examples/http2-aggressive-splitting/README.md b/examples/http2-aggressive-splitting/README.md index 30f546512..2bd955ec9 100644 --- a/examples/http2-aggressive-splitting/README.md +++ b/examples/http2-aggressive-splitting/README.md @@ -45,23 +45,23 @@ module.exports = { ``` Hash: 35256bb30300e8777ddd -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names 04e95786881a7db62441.js 53.1 kB 7 [emitted] -af5b936f620d7c2cf46e.js 57.4 kB 0 [emitted] +af5b936f620d7c2cf46e.js 57.5 kB 0 [emitted] d8035b04d59361a42a17.js 56.6 kB 2 [emitted] 92951e4964e84e709103.js 55.9 kB 3 [emitted] d323f006c00a41b194cb.js 55.9 kB 4 [emitted] 567bf6b0afa4e4baa4fb.js 53.7 kB 5 [emitted] -435514b5a5822c639a06.js 53.7 kB 6 [emitted] -fbb0bfdcf201839059f9.js 38.9 kB 1 [emitted] +435514b5a5822c639a06.js 53.8 kB 6 [emitted] +fbb0bfdcf201839059f9.js 39 kB 1 [emitted] ebe11885009391a25f13.js 37.9 kB 8 [emitted] 1aa11917196d1d3b05c1.js 52.1 kB 9 [emitted] 8556f2285fd844cf9fdd.js 51 kB 10 [emitted] c6598918ddb96aa65fc4.js 50.7 kB 11 [emitted] -17613f7c75a33459b935.js 41.8 kB 12 [emitted] +17613f7c75a33459b935.js 41.9 kB 12 [emitted] 8cc7b4a18437614b45e4.js 59.6 kB 13 [emitted] -11202a345a2ce63a2fb7.js 31.3 kB 14 [emitted] +11202a345a2ce63a2fb7.js 31.4 kB 14 [emitted] Entrypoint main = 8cc7b4a18437614b45e4.js 11202a345a2ce63a2fb7.js 17613f7c75a33459b935.js chunk {0} af5b936f620d7c2cf46e.js 49.8 kB {12} {13} {14} [rendered] [recorded] > aggressive-splitted [14] ./example.js 2:0-22 @@ -115,7 +115,7 @@ chunk {14} 11202a345a2ce63a2fb7.js 30.2 kB [initial] [rendered] [recorded] ``` Hash: 35256bb30300e8777ddd -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names 04e95786881a7db62441.js 10.3 kB 7 [emitted] af5b936f620d7c2cf46e.js 12.3 kB 0 [emitted] diff --git a/examples/hybrid-routing/README.md b/examples/hybrid-routing/README.md index a2627cd57..51a8c43c2 100644 --- a/examples/hybrid-routing/README.md +++ b/examples/hybrid-routing/README.md @@ -181,7 +181,7 @@ window.onLinkToPage = function onLinkToPage(name) { // name is "a" or "b" /******/ // start chunk loading /******/ var head = document.getElementsByTagName('head')[0]; /******/ var script = document.createElement('script'); -/******/ script.type = 'text/javascript'; +/******/ script.type = "text/javascript"; /******/ script.charset = 'utf-8'; /******/ script.async = true; /******/ script.timeout = 120000; @@ -258,7 +258,7 @@ window.onLinkToPage = function onLinkToPage(name) { // name is "a" or "b" /*!*******************!*\ !*** ./render.js ***! \*******************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -275,7 +275,7 @@ module.exports = function(page) { /*!*******************!*\ !*** ./router.js ***! \*******************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -310,7 +310,7 @@ window.onLinkToPage = function onLinkToPage(name) { // name is "a" or "b" /*!***********************************************************!*\ !*** . (webpack)/node_modules/bundle-loader ^\.\/.*Page$ ***! \***********************************************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -339,7 +339,7 @@ webpackContext.id = 6; /*!*******************************************************!*\ !*** (webpack)/node_modules/bundle-loader!./aPage.js ***! \*******************************************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -363,7 +363,7 @@ __webpack_require__.e/* require.ensure */(1).then((function(require) { /*!*******************************************************!*\ !*** (webpack)/node_modules/bundle-loader!./bPage.js ***! \*******************************************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -395,7 +395,7 @@ webpackJsonp([3,1],[ /*!******************!*\ !*** ./aPage.js ***! \******************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -409,7 +409,7 @@ module.exports = function() { /*!*******************!*\ !*** ./aEntry.js ***! \*******************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -430,7 +430,7 @@ webpackJsonp([1],[ /*!******************!*\ !*** ./aPage.js ***! \******************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -448,12 +448,12 @@ module.exports = function() { ``` Hash: 4b00bdf84d7923f55b44 -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names - 0.chunk.js 267 bytes 0 [emitted] - 1.chunk.js 273 bytes 1 [emitted] -pageB.bundle.js 630 bytes 2, 0 [emitted] pageB -pageA.bundle.js 621 bytes 3, 1 [emitted] pageA + 0.chunk.js 268 bytes 0 [emitted] + 1.chunk.js 274 bytes 1 [emitted] +pageB.bundle.js 632 bytes 2, 0 [emitted] pageB +pageA.bundle.js 623 bytes 3, 1 [emitted] pageA commons.js 9.59 kB 4 [emitted] commons Entrypoint pageA = commons.js pageA.bundle.js Entrypoint pageB = commons.js pageB.bundle.js @@ -499,7 +499,7 @@ chunk {4} commons.js (commons) 1.71 kB [entry] [rendered] ``` Hash: 4b00bdf84d7923f55b44 -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names 0.chunk.js 83 bytes 0 [emitted] 1.chunk.js 82 bytes 1 [emitted] diff --git a/examples/i18n/README.md b/examples/i18n/README.md index 154b20367..41fc5ab1c 100644 --- a/examples/i18n/README.md +++ b/examples/i18n/README.md @@ -126,7 +126,7 @@ module.exports = Object.keys(languages).map(function(language) { /*!********************!*\ !*** ./example.js ***! \********************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -210,7 +210,7 @@ console.log("Missing Text"); /*!********************!*\ !*** ./example.js ***! \********************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -226,8 +226,8 @@ console.log("Missing Text"); ## Uncompressed ``` -Hash: b61d16621736c97f557e52b4d8e68140f1345ef8 -Version: webpack 3.5.1 +Hash: b61d16621736c97f557ecfc55ada03fb1fa10004 +Version: webpack 3.11.0 Child en: Hash: b61d16621736c97f557e Asset Size Chunks Chunk Names @@ -237,7 +237,7 @@ Child en: > main [0] ./example.js [0] ./example.js 65 bytes {0} [built] Child de: - Hash: 52b4d8e68140f1345ef8 + Hash: cfc55ada03fb1fa10004 Asset Size Chunks Chunk Names de.output.js 2.69 kB 0 [emitted] main Entrypoint main = de.output.js @@ -252,8 +252,8 @@ Child de: ## Minimized (uglify-js, no zip) ``` -Hash: b61d16621736c97f557e52b4d8e68140f1345ef8 -Version: webpack 3.5.1 +Hash: b61d16621736c97f557ecfc55ada03fb1fa10004 +Version: webpack 3.11.0 Child en: Hash: b61d16621736c97f557e Asset Size Chunks Chunk Names @@ -263,7 +263,7 @@ Child en: > main [0] ./example.js [0] ./example.js 65 bytes {0} [built] Child de: - Hash: 52b4d8e68140f1345ef8 + Hash: cfc55ada03fb1fa10004 Asset Size Chunks Chunk Names de.output.js 537 bytes 0 [emitted] main Entrypoint main = de.output.js diff --git a/examples/loader/README.md b/examples/loader/README.md index cd8d8a83a..b2242879d 100644 --- a/examples/loader/README.md +++ b/examples/loader/README.md @@ -111,7 +111,7 @@ module.exports = function(content) { /*!****************************************************!*\ !*** (webpack)/node_modules/css-loader!./test.css ***! \****************************************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -130,7 +130,7 @@ exports.push([module.i, ".some-class {\r\n\tcolor: hotpink;\r\n}\r\n", ""]); /*!********************!*\ !*** ./example.js ***! \********************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -147,7 +147,7 @@ console.dir(__webpack_require__(/*! css-loader!./test.css */ 0)); // manual /*!*****************************!*\ !*** ./loader.js!./file.js ***! \*****************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -159,7 +159,7 @@ exports.foo = "bar"; /*!*********************************************************!*\ !*** (webpack)/node_modules/css-loader/lib/css-base.js ***! \*********************************************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -261,9 +261,9 @@ Prints in node.js (`enhanced-require example.js`) and in browser: ``` Hash: c15a21a2e67111e1cd94 -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names -output.js 6.24 kB 0 [emitted] main +output.js 6.25 kB 0 [emitted] main Entrypoint main = output.js chunk {0} output.js (main) 2.72 kB [entry] [rendered] > main [1] ./example.js @@ -280,7 +280,7 @@ chunk {0} output.js (main) 2.72 kB [entry] [rendered] ``` Hash: 1848e785d8b4fe1c67d0 -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names output.js 1.48 kB 0 [emitted] main Entrypoint main = output.js diff --git a/examples/mixed/README.md b/examples/mixed/README.md index 85e02904b..7a44d9533 100644 --- a/examples/mixed/README.md +++ b/examples/mixed/README.md @@ -139,7 +139,7 @@ require( /******/ // start chunk loading /******/ var head = document.getElementsByTagName('head')[0]; /******/ var script = document.createElement('script'); -/******/ script.type = 'text/javascript'; +/******/ script.type = "text/javascript"; /******/ script.charset = 'utf-8'; /******/ script.async = true; /******/ script.timeout = 120000; @@ -216,7 +216,7 @@ require( /*!*********************!*\ !*** ./commonjs.js ***! \*********************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -224,28 +224,28 @@ require( module.exports = 123; // but you can use amd style requires -new Promise(function(resolve) { resolve(); }).then(function() { var __WEBPACK_AMD_REQUIRE_ARRAY__ = [__webpack_require__(/*! ./amd */ 1), __webpack_require__(/*! ./harmony */ 2)]; (function(amd1, harmony) { +new Promise(function(resolve) { resolve(); }).then(function() { var __WEBPACK_AMD_REQUIRE_ARRAY__ = [__webpack_require__(/*! ./amd */ 1), __webpack_require__(/*! ./harmony */ 2)]; ((function(amd1, harmony) { var amd2 = __webpack_require__(/*! ./amd */ 1); var harmony2 = __webpack_require__(/*! ./harmony */ 2); - }.apply(null, __WEBPACK_AMD_REQUIRE_ARRAY__));}).catch(__webpack_require__.oe); + }).apply(null, __WEBPACK_AMD_REQUIRE_ARRAY__));}).catch(__webpack_require__.oe); /***/ }), /* 1 */ /*!****************!*\ !*** ./amd.js ***! \****************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// AMD Module Format -!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! ./commonjs */ 0), __webpack_require__(/*! ./harmony */ 2)], __WEBPACK_AMD_DEFINE_RESULT__ = function(commonjs1, harmony1) { +!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! ./commonjs */ 0), __webpack_require__(/*! ./harmony */ 2)], __WEBPACK_AMD_DEFINE_RESULT__ = (function(commonjs1, harmony1) { // but you can use CommonJs-style requires: var commonjs2 = __webpack_require__(/*! ./commonjs */ 0); var harmony2 = __webpack_require__(/*! ./harmony */ 2); // Do something... return 456; - }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), + }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }), @@ -275,7 +275,7 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /*!********************!*\ !*** ./example.js ***! \********************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -288,9 +288,9 @@ var harmony1 = __webpack_require__(/*! ./harmony */ 2); __webpack_require__.e/* require */(0).then(function() { var __WEBPACK_AMD_REQUIRE_ARRAY__ = [ __webpack_require__(/*! ./commonjs */ 0), __webpack_require__(/*! ./amd */ 1), __webpack_require__(/*! ../require.context/templates */ 4)("./"+amd1+".js"), - Math.random() < 0.5 ? __webpack_require__(/*! ./commonjs */ 0) : __webpack_require__(/*! ./amd */ 1)]; (function(commonjs2, amd2, template, randModule) { + Math.random() < 0.5 ? __webpack_require__(/*! ./commonjs */ 0) : __webpack_require__(/*! ./amd */ 1)]; ((function(commonjs2, amd2, template, randModule) { // Do something with it... - }.apply(null, __WEBPACK_AMD_REQUIRE_ARRAY__));}).catch(__webpack_require__.oe); + }).apply(null, __WEBPACK_AMD_REQUIRE_ARRAY__));}).catch(__webpack_require__.oe); /***/ }) @@ -309,7 +309,7 @@ webpackJsonp([0],[ /*!*************************************************!*\ !*** ../require.context/templates ^\.\/.*\.js$ ***! \*************************************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -339,7 +339,7 @@ webpackContext.id = 4; /*!*****************************************!*\ !*** ../require.context/templates/a.js ***! \*****************************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -352,7 +352,7 @@ module.exports = function() { /*!*****************************************!*\ !*** ../require.context/templates/b.js ***! \*****************************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -365,7 +365,7 @@ module.exports = function() { /*!*****************************************!*\ !*** ../require.context/templates/c.js ***! \*****************************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -383,10 +383,10 @@ module.exports = function() { ``` Hash: ec4ce5e31af3a13d93fa -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names 0.output.js 1.86 kB 0 [emitted] - output.js 9.08 kB 1 [emitted] main + output.js 9.09 kB 1 [emitted] main Entrypoint main = output.js chunk {0} 0.output.js 439 bytes {1} [rendered] > [3] ./example.js 7:0-14:1 @@ -428,7 +428,7 @@ chunk {1} output.js (main) 1.05 kB [entry] [rendered] ``` Hash: ec4ce5e31af3a13d93fa -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names 0.output.js 523 bytes 0 [emitted] output.js 1.89 kB 1 [emitted] main diff --git a/examples/move-to-parent/README.md b/examples/move-to-parent/README.md index 6acb8b9af..7e3f91128 100644 --- a/examples/move-to-parent/README.md +++ b/examples/move-to-parent/README.md @@ -106,14 +106,14 @@ module.exports = [{ ``` Hash: 32754229c1b49aaf5dd3020f354a206f830a17560d92a3529fe0380101f3e2c85f80fcddae09adcf -Version: webpack 3.5.1 +Version: webpack 3.11.0 Child page: Hash: 32754229c1b49aaf5dd3 Asset Size Chunks Chunk Names - 0.chunk.js 800 bytes 0, 1, 2, 3 [emitted] - 1.chunk.js 598 bytes 1, 2, 3 [emitted] - 2.chunk.js 405 bytes 2, 3 [emitted] - 3.chunk.js 212 bytes 3 [emitted] + 0.chunk.js 804 bytes 0, 1, 2, 3 [emitted] + 1.chunk.js 601 bytes 1, 2, 3 [emitted] + 2.chunk.js 407 bytes 2, 3 [emitted] + 3.chunk.js 213 bytes 3 [emitted] page.bundle.js 6.62 kB 4 [emitted] page Entrypoint page = page.bundle.js chunk {0} 0.chunk.js 84 bytes {4} [rendered] @@ -140,9 +140,9 @@ Child page: Child pageA: Hash: 020f354a206f830a1756 Asset Size Chunks Chunk Names - 0.chunk.js 616 bytes 0, 1, 2 [emitted] - 1.chunk.js 414 bytes 1, 2 [emitted] - 2.chunk.js 221 bytes 2 [emitted] + 0.chunk.js 619 bytes 0, 1, 2 [emitted] + 1.chunk.js 416 bytes 1, 2 [emitted] + 2.chunk.js 222 bytes 2 [emitted] pageA.bundle.js 6.83 kB 3 [emitted] pageA Entrypoint pageA = pageA.bundle.js chunk {0} 0.chunk.js 63 bytes {3} [rendered] @@ -164,8 +164,8 @@ Child pageA: Child pageB: Hash: 0d92a3529fe0380101f3 Asset Size Chunks Chunk Names - 0.chunk.js 432 bytes 0, 1 [emitted] - 1.chunk.js 215 bytes 1 [emitted] + 0.chunk.js 434 bytes 0, 1 [emitted] + 1.chunk.js 216 bytes 1 [emitted] pageB.bundle.js 7.02 kB 2 [emitted] pageB Entrypoint pageB = pageB.bundle.js chunk {0} 0.chunk.js 42 bytes {2} [rendered] @@ -183,8 +183,8 @@ Child pageB: Child pageC: Hash: e2c85f80fcddae09adcf Asset Size Chunks Chunk Names - 0.chunk.js 221 bytes 0 [emitted] - pageC.bundle.js 7.23 kB 1 [emitted] pageC + 0.chunk.js 222 bytes 0 [emitted] + pageC.bundle.js 7.25 kB 1 [emitted] pageC Entrypoint pageC = pageC.bundle.js chunk {0} 0.chunk.js 21 bytes {1} [rendered] > duplicate [3] ./page.js 2:0-23 @@ -203,7 +203,7 @@ Child pageC: ``` Hash: 32754229c1b49aaf5dd3020f354a206f830a17560d92a3529fe0380101f3e2c85f80fcddae09adcf -Version: webpack 3.5.1 +Version: webpack 3.11.0 Child page: Hash: 32754229c1b49aaf5dd3 Asset Size Chunks Chunk Names diff --git a/examples/multi-compiler/README.md b/examples/multi-compiler/README.md index ab4746d9b..038d7a2e5 100644 --- a/examples/multi-compiler/README.md +++ b/examples/multi-compiler/README.md @@ -123,7 +123,7 @@ module.exports = [ /*!********************!*\ !*** ./example.js ***! \********************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -209,7 +209,7 @@ console.log("Running " + "desktop" + " build"); /*!********************!*\ !*** ./example.js ***! \********************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -223,7 +223,7 @@ console.log("Running " + "mobile" + " build"); /*!*************************!*\ !*** ./mobile-stuff.js ***! \*************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -239,7 +239,7 @@ console.log("Running " + "mobile" + " build"); ``` Hash: a201abd2de73265dd538cceba4bc5163d755f291 -Version: webpack 3.5.1 +Version: webpack 3.11.0 Child mobile: Hash: a201abd2de73265dd538 Asset Size Chunks Chunk Names @@ -264,7 +264,7 @@ Child desktop: ``` Hash: a201abd2de73265dd538cceba4bc5163d755f291 -Version: webpack 3.5.1 +Version: webpack 3.11.0 Child mobile: Hash: a201abd2de73265dd538 Asset Size Chunks Chunk Names diff --git a/examples/multi-part-library/README.md b/examples/multi-part-library/README.md index 920f7fae1..ea6d04166 100644 --- a/examples/multi-part-library/README.md +++ b/examples/multi-part-library/README.md @@ -42,7 +42,7 @@ module.exports = { exports["alpha"] = factory(); else root["MyLibrary"] = root["MyLibrary"] || {}, root["MyLibrary"]["alpha"] = factory(); -})(this, function() { +})(typeof self !== 'undefined' ? self : this, function() { ```
return /******/ (function(modules) { /* webpackBootstrap */ }) @@ -122,7 +122,7 @@ return /******/ (function(modules) { // webpackBootstrap /*!******************!*\ !*** ./alpha.js ***! \******************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -145,7 +145,7 @@ module.exports = "alpha"; exports["beta"] = factory(); else root["MyLibrary"] = root["MyLibrary"] || {}, root["MyLibrary"]["beta"] = factory(); -})(this, function() { +})(typeof self !== 'undefined' ? self : this, function() { return /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; @@ -217,7 +217,7 @@ return /******/ (function(modules) { // webpackBootstrap /*!*****************!*\ !*** ./beta.js ***! \*****************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -234,10 +234,10 @@ module.exports = "beta"; ``` Hash: e5033b72cf0ec9da1ad7 -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names - MyLibrary.beta.js 3.06 kB 0 [emitted] beta -MyLibrary.alpha.js 3.05 kB 1 [emitted] alpha + MyLibrary.beta.js 3.09 kB 0 [emitted] beta +MyLibrary.alpha.js 3.09 kB 1 [emitted] alpha Entrypoint alpha = MyLibrary.alpha.js Entrypoint beta = MyLibrary.beta.js chunk {0} MyLibrary.beta.js (beta) 24 bytes [entry] [rendered] @@ -252,10 +252,10 @@ chunk {1} MyLibrary.alpha.js (alpha) 25 bytes [entry] [rendered] ``` Hash: e5033b72cf0ec9da1ad7 -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names - MyLibrary.beta.js 759 bytes 0 [emitted] beta -MyLibrary.alpha.js 761 bytes 1 [emitted] alpha + MyLibrary.beta.js 789 bytes 0 [emitted] beta +MyLibrary.alpha.js 791 bytes 1 [emitted] alpha Entrypoint alpha = MyLibrary.alpha.js Entrypoint beta = MyLibrary.beta.js chunk {0} MyLibrary.beta.js (beta) 24 bytes [entry] [rendered] diff --git a/examples/multiple-commons-chunks/README.md b/examples/multiple-commons-chunks/README.md index 68b2cabf7..b8e9867b5 100644 --- a/examples/multiple-commons-chunks/README.md +++ b/examples/multiple-commons-chunks/README.md @@ -143,55 +143,6 @@ module.exports = { /******/ return module.exports; /******/ } /******/ -/******/ // This file contains only the entry chunk. -/******/ // The chunk loading function for additional chunks -/******/ __webpack_require__.e = function requireEnsure(chunkId) { -/******/ var installedChunkData = installedChunks[chunkId]; -/******/ if(installedChunkData === 0) { -/******/ return new Promise(function(resolve) { resolve(); }); -/******/ } -/******/ -/******/ // a Promise means "currently loading". -/******/ if(installedChunkData) { -/******/ return installedChunkData[2]; -/******/ } -/******/ -/******/ // setup Promise in chunk cache -/******/ var promise = new Promise(function(resolve, reject) { -/******/ installedChunkData = installedChunks[chunkId] = [resolve, reject]; -/******/ }); -/******/ installedChunkData[2] = promise; -/******/ -/******/ // start chunk loading -/******/ var head = document.getElementsByTagName('head')[0]; -/******/ var script = document.createElement('script'); -/******/ script.type = 'text/javascript'; -/******/ script.charset = 'utf-8'; -/******/ script.async = true; -/******/ script.timeout = 120000; -/******/ -/******/ if (__webpack_require__.nc) { -/******/ script.setAttribute("nonce", __webpack_require__.nc); -/******/ } -/******/ script.src = __webpack_require__.p + "" + chunkId + ".js"; -/******/ var timeout = setTimeout(onScriptComplete, 120000); -/******/ script.onerror = script.onload = onScriptComplete; -/******/ function onScriptComplete() { -/******/ // avoid mem leaks in IE. -/******/ script.onerror = script.onload = null; -/******/ clearTimeout(timeout); -/******/ var chunk = installedChunks[chunkId]; -/******/ if(chunk !== 0) { -/******/ if(chunk) { -/******/ chunk[1](new Error('Loading chunk ' + chunkId + ' failed.')); -/******/ } -/******/ installedChunks[chunkId] = undefined; -/******/ } -/******/ }; -/******/ head.appendChild(script); -/******/ -/******/ return promise; -/******/ }; /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; @@ -239,7 +190,7 @@ module.exports = { /*!**************************!*\ !*** ./modules/a-b-c.js ***! \**************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -253,7 +204,7 @@ module.exports = { /*!************************!*\ !*** ./modules/a-b.js ***! \************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -272,7 +223,7 @@ webpackJsonp([2],{ /*!************************!*\ !*** ./modules/a-c.js ***! \************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -284,7 +235,7 @@ webpackJsonp([2],{ /*!******************!*\ !*** ./pageA.js ***! \******************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -307,7 +258,7 @@ webpackJsonp([4],[ /*!**************************!*\ !*** ./modules/admin.js ***! \**************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -326,7 +277,7 @@ webpackJsonp([6],{ /*!***********************!*\ !*** ./adminPageA.js ***! \***********************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -344,17 +295,17 @@ __webpack_require__(/*! ./modules/admin */ 1); ``` Hash: 3ef8f91b150be0e10937 -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names - pageC.js 813 bytes 0 [emitted] pageC - pageB.js 573 bytes 1 [emitted] pageB - pageA.js 573 bytes 2 [emitted] pageA - adminPageC.js 552 bytes 3, 4 [emitted] adminPageC -admin-commons.js 236 bytes 4 [emitted] admin-commons - adminPageB.js 340 bytes 5 [emitted] adminPageB - adminPageA.js 340 bytes 6 [emitted] adminPageA - commons.js 6.24 kB 7, 8 [emitted] commons - c-commons.js 5.99 kB 8 [emitted] c-commons + pageC.js 816 bytes 0 [emitted] pageC + pageB.js 575 bytes 1 [emitted] pageB + pageA.js 575 bytes 2 [emitted] pageA + adminPageC.js 554 bytes 3, 4 [emitted] adminPageC +admin-commons.js 237 bytes 4 [emitted] admin-commons + adminPageB.js 341 bytes 5 [emitted] adminPageB + adminPageA.js 341 bytes 6 [emitted] adminPageA + commons.js 4.3 kB 7, 8 [emitted] commons + c-commons.js 4.06 kB 8 [emitted] c-commons Entrypoint pageA = commons.js pageA.js Entrypoint pageB = commons.js pageB.js Entrypoint pageC = c-commons.js pageC.js @@ -425,17 +376,17 @@ chunk {8} c-commons.js (c-commons) 0 bytes [entry] [rendered] ``` Hash: 3ef8f91b150be0e10937 -Version: webpack 3.5.1 - Asset Size Chunks Chunk Names - pageC.js 93 bytes 0 [emitted] pageC - pageB.js 76 bytes 1 [emitted] pageB - pageA.js 76 bytes 2 [emitted] pageA - adminPageC.js 75 bytes 3, 4 [emitted] adminPageC -admin-commons.js 37 bytes 4 [emitted] admin-commons - adminPageB.js 53 bytes 5 [emitted] adminPageB - adminPageA.js 53 bytes 6 [emitted] adminPageA - commons.js 1.4 kB 7, 8 [emitted] commons - c-commons.js 1.38 kB 8 [emitted] c-commons +Version: webpack 3.11.0 + Asset Size Chunks Chunk Names + pageC.js 93 bytes 0 [emitted] pageC + pageB.js 76 bytes 1 [emitted] pageB + pageA.js 76 bytes 2 [emitted] pageA + adminPageC.js 75 bytes 3, 4 [emitted] adminPageC +admin-commons.js 37 bytes 4 [emitted] admin-commons + adminPageB.js 53 bytes 5 [emitted] adminPageB + adminPageA.js 53 bytes 6 [emitted] adminPageA + commons.js 839 bytes 7, 8 [emitted] commons + c-commons.js 816 bytes 8 [emitted] c-commons Entrypoint pageA = commons.js pageA.js Entrypoint pageB = commons.js pageB.js Entrypoint pageC = c-commons.js pageC.js diff --git a/examples/multiple-entry-points-commons-chunk-css-bundle/README.md b/examples/multiple-entry-points-commons-chunk-css-bundle/README.md index 55c7cac85..316e6ce23 100644 --- a/examples/multiple-entry-points-commons-chunk-css-bundle/README.md +++ b/examples/multiple-entry-points-commons-chunk-css-bundle/README.md @@ -102,7 +102,7 @@ webpackJsonp([1],[ /*!**************!*\ !*** ./a.js ***! \**************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -115,7 +115,7 @@ __webpack_require__(/*! ./styleA.css */ 2); /*!********************!*\ !*** ./styleA.css ***! \********************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -178,16 +178,16 @@ body{background:url(js/ce21cbdd9b894e6af794813eb3fdaf60.png)}.c{background:url(j ``` Hash: b6d05f310264e74bb969 -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names C.js 2.89 kB 2 [emitted] C d090b6fba0f6d326d282a19146ff54a7.png 120 bytes [emitted] ce21cbdd9b894e6af794813eb3fdaf60.png 119 bytes [emitted] c2a2f62d69330b7d787782f5010f9d13.png 120 bytes [emitted] - B.js 561 bytes 0 [emitted] B - A.js 543 bytes 1 [emitted] A + B.js 563 bytes 0 [emitted] B + A.js 545 bytes 1 [emitted] A 16155c689e517682064c99893cb832cc.png 120 bytes [emitted] - commons.js 6.01 kB 3 [emitted] commons + commons.js 4.08 kB 3 [emitted] commons A.css 69 bytes 1 [emitted] A B.css 69 bytes 0 [emitted] B C.css 140 bytes 2 [emitted] C @@ -260,7 +260,7 @@ Child extract-text-webpack-plugin ../../node_modules/extract-text-webpack-plugin ``` Hash: 71684330ef0116733460 -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names C.js 508 bytes 2 [emitted] C d090b6fba0f6d326d282a19146ff54a7.png 120 bytes [emitted] @@ -269,7 +269,7 @@ c2a2f62d69330b7d787782f5010f9d13.png 120 bytes [emitted] B.js 70 bytes 0 [emitted] B A.js 68 bytes 1 [emitted] A 16155c689e517682064c99893cb832cc.png 120 bytes [emitted] - commons.js 1.38 kB 3 [emitted] commons + commons.js 816 bytes 3 [emitted] commons A.css 59 bytes 1 [emitted] A B.css 59 bytes 0 [emitted] B C.css 120 bytes 2 [emitted] C diff --git a/examples/multiple-entry-points/README.md b/examples/multiple-entry-points/README.md index d2b7b897e..a94636a62 100644 --- a/examples/multiple-entry-points/README.md +++ b/examples/multiple-entry-points/README.md @@ -171,7 +171,7 @@ module.exports = { /******/ // start chunk loading /******/ var head = document.getElementsByTagName('head')[0]; /******/ var script = document.createElement('script'); -/******/ script.type = 'text/javascript'; +/******/ script.type = "text/javascript"; /******/ script.charset = 'utf-8'; /******/ script.async = true; /******/ script.timeout = 120000; @@ -245,7 +245,7 @@ module.exports = { /*!*******************!*\ !*** ./common.js ***! \*******************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -264,14 +264,14 @@ webpackJsonp([2],{ /*!******************!*\ !*** ./pageA.js ***! \******************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { var common = __webpack_require__(/*! ./common */ 0); -__webpack_require__.e/* require */(0).then(function() { var __WEBPACK_AMD_REQUIRE_ARRAY__ = [__webpack_require__(/*! ./shared */ 1)]; (function(shared) { +__webpack_require__.e/* require */(0/* duplicate */).then(function() { var __WEBPACK_AMD_REQUIRE_ARRAY__ = [__webpack_require__(/*! ./shared */ 1)]; ((function(shared) { shared("This is page A"); -}.apply(null, __WEBPACK_AMD_REQUIRE_ARRAY__));}).catch(__webpack_require__.oe); +}).apply(null, __WEBPACK_AMD_REQUIRE_ARRAY__));}).catch(__webpack_require__.oe); /***/ }) @@ -287,7 +287,7 @@ webpackJsonp([1],{ /*!******************!*\ !*** ./pageB.js ***! \******************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -311,7 +311,7 @@ webpackJsonp([0],[ /*!*******************!*\ !*** ./shared.js ***! \*******************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -330,11 +330,11 @@ module.exports = function(msg) { ``` Hash: 4f8af9066e2b5dda0f23 -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names - 0.chunk.js 346 bytes 0 [emitted] -pageB.bundle.js 521 bytes 1 [emitted] pageB -pageA.bundle.js 547 bytes 2 [emitted] pageA + 0.chunk.js 347 bytes 0 [emitted] +pageB.bundle.js 522 bytes 1 [emitted] pageB +pageA.bundle.js 565 bytes 2 [emitted] pageA commons.js 6 kB 3 [emitted] commons Entrypoint pageA = commons.js pageA.bundle.js Entrypoint pageB = commons.js pageB.bundle.js @@ -362,7 +362,7 @@ chunk {3} commons.js (commons) 26 bytes [entry] [rendered] ``` Hash: 4f8af9066e2b5dda0f23 -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names 0.chunk.js 81 bytes 0 [emitted] pageB.bundle.js 122 bytes 1 [emitted] pageB diff --git a/examples/named-chunks/README.md b/examples/named-chunks/README.md index aabbe660e..ad8966b24 100644 --- a/examples/named-chunks/README.md +++ b/examples/named-chunks/README.md @@ -109,7 +109,7 @@ require.ensure(["b"], function(require) { /******/ // start chunk loading /******/ var head = document.getElementsByTagName('head')[0]; /******/ var script = document.createElement('script'); -/******/ script.type = 'text/javascript'; +/******/ script.type = "text/javascript"; /******/ script.charset = 'utf-8'; /******/ script.async = true; /******/ script.timeout = 120000; @@ -188,7 +188,7 @@ require.ensure(["b"], function(require) { /*!********************!*\ !*** ./example.js ***! \********************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -219,7 +219,7 @@ __webpack_require__.e/* require.ensure */(1).then((function(require) { /*!***************************!*\ !*** ./node_modules/a.js ***! \***************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -237,7 +237,7 @@ webpackJsonp([0,1],[ /*!***************************!*\ !*** ./node_modules/b.js ***! \***************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -248,7 +248,7 @@ webpackJsonp([0,1],[ /*!***************************!*\ !*** ./node_modules/d.js ***! \***************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -261,7 +261,7 @@ webpackJsonp([0,1],[ /*!***************************!*\ !*** ./node_modules/c.js ***! \***************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -279,7 +279,7 @@ webpackJsonp([1],[ /*!***************************!*\ !*** ./node_modules/b.js ***! \***************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -290,7 +290,7 @@ webpackJsonp([1],[ /*!***************************!*\ !*** ./node_modules/d.js ***! \***************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -306,11 +306,11 @@ webpackJsonp([1],[ ``` Hash: 1e92144469a06ecc61e5 -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names -0.output.js 701 bytes 0, 1 [emitted] my own chunk -1.output.js 461 bytes 1 [emitted] - output.js 7.04 kB 2 [emitted] main +0.output.js 704 bytes 0, 1 [emitted] my own chunk +1.output.js 463 bytes 1 [emitted] + output.js 7.05 kB 2 [emitted] main Entrypoint main = output.js chunk {0} 0.output.js (my own chunk) 33 bytes {2} [rendered] > my own chunk [2] ./example.js 3:0-6:18 @@ -330,7 +330,7 @@ chunk {2} output.js (main) 452 bytes [entry] [rendered] ``` Hash: 1e92144469a06ecc61e5 -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names 0.output.js 72 bytes 0, 1 [emitted] my own chunk 1.output.js 52 bytes 1 [emitted] diff --git a/examples/require.context/README.md b/examples/require.context/README.md index ba8db6f51..b23880c8e 100644 --- a/examples/require.context/README.md +++ b/examples/require.context/README.md @@ -102,7 +102,7 @@ module.exports = function() { /*!************************!*\ !*** ./templates/a.js ***! \************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -115,7 +115,7 @@ module.exports = function() { /*!************************!*\ !*** ./templates/b.js ***! \************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -128,7 +128,7 @@ module.exports = function() { /*!************************!*\ !*** ./templates/c.js ***! \************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -141,7 +141,7 @@ module.exports = function() { /*!********************!*\ !*** ./example.js ***! \********************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -156,7 +156,7 @@ console.log(getTemplate("b")); /*!****************************!*\ !*** ./templates ^\.\/.*$ ***! \****************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -194,9 +194,9 @@ webpackContext.id = 4; ``` Hash: acf02a400c4d02cc105a -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names -output.js 4.42 kB 0 [emitted] main +output.js 4.43 kB 0 [emitted] main Entrypoint main = output.js chunk {0} output.js (main) 613 bytes [entry] [rendered] > main [3] ./example.js @@ -218,7 +218,7 @@ chunk {0} output.js (main) 613 bytes [entry] [rendered] ``` Hash: acf02a400c4d02cc105a -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names output.js 1.08 kB 0 [emitted] main Entrypoint main = output.js diff --git a/examples/require.resolve/README.md b/examples/require.resolve/README.md index ab9fb42b6..102ad3928 100644 --- a/examples/require.resolve/README.md +++ b/examples/require.resolve/README.md @@ -103,7 +103,7 @@ module.exports = Math.random(); /*!**************!*\ !*** ./a.js ***! \**************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -114,7 +114,7 @@ module.exports = Math.random(); /*!********************!*\ !*** ./example.js ***! \********************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -142,7 +142,7 @@ if(a == a2) throw new Error("Cache clear failed :("); ``` Hash: 4ed342adc60583d992ab -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names output.js 3.18 kB 0 [emitted] main Entrypoint main = output.js @@ -159,7 +159,7 @@ chunk {0} output.js (main) 326 bytes [entry] [rendered] ``` Hash: 4ed342adc60583d992ab -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names output.js 599 bytes 0 [emitted] main Entrypoint main = output.js diff --git a/examples/scope-hoisting/README.md b/examples/scope-hoisting/README.md index fd9c88d03..2ef043989 100644 --- a/examples/scope-hoisting/README.md +++ b/examples/scope-hoisting/README.md @@ -198,7 +198,7 @@ module.exports = { /******/ // start chunk loading /******/ var head = document.getElementsByTagName('head')[0]; /******/ var script = document.createElement('script'); -/******/ script.type = 'text/javascript'; +/******/ script.type = "text/javascript"; /******/ script.charset = 'utf-8'; /******/ script.async = true; /******/ script.timeout = 120000; @@ -280,7 +280,6 @@ module.exports = { /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); // CONCATENATED MODULE: ./node_modules/shared2.js // shared2 module @@ -299,7 +298,7 @@ var x = "x"; /*!********************************!*\ !*** ./example.js + 2 modules ***! \********************************/ -/*! exports provided: */ +/*! no exports provided */ /*! all exports used */ /*! ModuleConcatenation bailout: Module is an entry point */ /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -344,7 +343,7 @@ webpackJsonp([0],[ /*!*****************************!*\ !*** ./node_modules/cjs.js ***! \*****************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! exports used: c */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */ /***/ (function(module, exports) { @@ -413,10 +412,10 @@ webpackJsonp([0],[,,function(n,r){r.c="e"},function(n,r,t){"use strict";Object.d ``` Hash: 6596ce0a50ccbbaa89c6 -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names 0.output.js 1.9 kB 0 [emitted] - output.js 7.39 kB 1 [emitted] main + output.js 7.32 kB 1 [emitted] main Entrypoint main = output.js chunk {0} 0.output.js 286 bytes {1} [rendered] > [] 4:0-16 @@ -439,10 +438,10 @@ chunk {1} output.js (main) 390 bytes [entry] [rendered] ``` Hash: 6596ce0a50ccbbaa89c6 -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names 0.output.js 364 bytes 0 [emitted] - output.js 1.66 kB 1 [emitted] main + output.js 1.61 kB 1 [emitted] main Entrypoint main = output.js chunk {0} 0.output.js 286 bytes {1} [rendered] > [] 4:0-16 diff --git a/examples/source-map/README.md b/examples/source-map/README.md index 5535de981..88f9ce9f9 100644 --- a/examples/source-map/README.md +++ b/examples/source-map/README.md @@ -57,7 +57,7 @@ webpackJsonp([0],[ /*!*************************************************************!*\ !*** (webpack)/node_modules/coffee-loader!./example.coffee ***! \*************************************************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -95,7 +95,7 @@ webpackJsonp([0],[ /*!*************************************************************!*\ !*** (webpack)/node_modules/coffee-loader!./example.coffee ***! \*************************************************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -132,7 +132,7 @@ webpackJsonp([0],[ /*!*************************************************************!*\ !*** (webpack)/node_modules/coffee-loader!./example.coffee ***! \*************************************************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -171,7 +171,7 @@ webpackJsonp([0],[ /*!*************************************************************!*\ !*** (webpack)/node_modules/coffee-loader!./example.coffee ***! \*************************************************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -188,7 +188,7 @@ webpackJsonp([0],[ /*!*************************************************************!*\ !*** (webpack)/node_modules/coffee-loader!./example.coffee ***! \*************************************************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -205,7 +205,7 @@ webpackJsonp([0],[ /*!*************************************************************!*\ !*** (webpack)/node_modules/coffee-loader!./example.coffee ***! \*************************************************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -222,7 +222,7 @@ webpackJsonp([0],[ /*!*************************************************************!*\ !*** (webpack)/node_modules/coffee-loader!./example.coffee ***! \*************************************************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -246,12 +246,12 @@ eval("var math, race,\n slice = [].slice;\n\nmath = {\n root: Math.sqrt,\n sq ``` Hash: 6ee996e84863368c38e521284f8d1d322741045b5f9e187528736f9dd586ad053259eb9ee4cf69b5354b67e68d715d903c31515124d263f93c8aa7159d388dea6bd43ac605cdd4e103e888cf20eaf6f75dc2d2924e3fdc22d6889086c1479edc2c87f028 -Version: webpack 3.5.1 +Version: webpack 3.11.0 Child Hash: 6ee996e84863368c38e5 Asset Size Chunks Chunk Names ./bundle-cheap-eval-source-map.js 1.69 kB 0 [emitted] bundle - ./manifest-cheap-eval-source-map.js 5.8 kB 1 [emitted] manifest + ./manifest-cheap-eval-source-map.js 3.84 kB 1 [emitted] manifest Entrypoint bundle = ./manifest-cheap-eval-source-map.js ./bundle-cheap-eval-source-map.js chunk {0} ./bundle-cheap-eval-source-map.js (bundle) 308 bytes {1} [initial] [rendered] > bundle [0] (webpack)/node_modules/coffee-loader!./example.coffee @@ -261,7 +261,7 @@ Child Hash: 21284f8d1d322741045b Asset Size Chunks Chunk Names ./bundle-cheap-module-eval-source-map.js 1.42 kB 0 [emitted] bundle - ./manifest-cheap-module-eval-source-map.js 5.81 kB 1 [emitted] manifest + ./manifest-cheap-module-eval-source-map.js 3.84 kB 1 [emitted] manifest Entrypoint bundle = ./manifest-cheap-module-eval-source-map.js ./bundle-cheap-module-eval-source-map.js chunk {0} ./bundle-cheap-module-eval-source-map.js (bundle) 308 bytes {1} [initial] [rendered] > bundle [0] (webpack)/node_modules/coffee-loader!./example.coffee @@ -270,10 +270,10 @@ Child Child Hash: 5f9e187528736f9dd586 Asset Size Chunks Chunk Names - ./bundle-cheap-module-source-map.js 703 bytes 0 [emitted] bundle - ./manifest-cheap-module-source-map.js 5.87 kB 1 [emitted] manifest + ./bundle-cheap-module-source-map.js 704 bytes 0 [emitted] bundle + ./manifest-cheap-module-source-map.js 3.9 kB 1 [emitted] manifest ./bundle-cheap-module-source-map.js.map 507 bytes 0 [emitted] bundle - ./manifest-cheap-module-source-map.js.map 5.9 kB 1 [emitted] manifest + ./manifest-cheap-module-source-map.js.map 3.92 kB 1 [emitted] manifest Entrypoint bundle = ./manifest-cheap-module-source-map.js ./manifest-cheap-module-source-map.js.map ./bundle-cheap-module-source-map.js ./bundle-cheap-module-source-map.js.map chunk {0} ./bundle-cheap-module-source-map.js, ./bundle-cheap-module-source-map.js.map (bundle) 308 bytes {1} [initial] [rendered] > bundle [0] (webpack)/node_modules/coffee-loader!./example.coffee @@ -282,10 +282,10 @@ Child Child Hash: ad053259eb9ee4cf69b5 Asset Size Chunks Chunk Names - ./bundle-cheap-source-map.js 696 bytes 0 [emitted] bundle - ./manifest-cheap-source-map.js 5.85 kB 1 [emitted] manifest + ./bundle-cheap-source-map.js 697 bytes 0 [emitted] bundle + ./manifest-cheap-source-map.js 3.9 kB 1 [emitted] manifest ./bundle-cheap-source-map.js.map 703 bytes 0 [emitted] bundle - ./manifest-cheap-source-map.js.map 5.88 kB 1 [emitted] manifest + ./manifest-cheap-source-map.js.map 3.91 kB 1 [emitted] manifest Entrypoint bundle = ./manifest-cheap-source-map.js ./manifest-cheap-source-map.js.map ./bundle-cheap-source-map.js ./bundle-cheap-source-map.js.map chunk {0} ./bundle-cheap-source-map.js, ./bundle-cheap-source-map.js.map (bundle) 308 bytes {1} [initial] [rendered] > bundle [0] (webpack)/node_modules/coffee-loader!./example.coffee @@ -294,8 +294,8 @@ Child Child Hash: 354b67e68d715d903c31 Asset Size Chunks Chunk Names - ./bundle-eval.js 890 bytes 0 [emitted] bundle - ./manifest-eval.js 5.79 kB 1 [emitted] manifest + ./bundle-eval.js 891 bytes 0 [emitted] bundle + ./manifest-eval.js 3.84 kB 1 [emitted] manifest Entrypoint bundle = ./manifest-eval.js ./bundle-eval.js chunk {0} ./bundle-eval.js (bundle) 308 bytes {1} [initial] [rendered] > bundle [0] (webpack)/node_modules/coffee-loader!./example.coffee @@ -305,7 +305,7 @@ Child Hash: 515124d263f93c8aa715 Asset Size Chunks Chunk Names ./bundle-eval-source-map.js 1.56 kB 0 [emitted] bundle - ./manifest-eval-source-map.js 5.8 kB 1 [emitted] manifest + ./manifest-eval-source-map.js 3.84 kB 1 [emitted] manifest Entrypoint bundle = ./manifest-eval-source-map.js ./bundle-eval-source-map.js chunk {0} ./bundle-eval-source-map.js (bundle) 308 bytes {1} [initial] [rendered] > bundle [0] (webpack)/node_modules/coffee-loader!./example.coffee @@ -314,10 +314,10 @@ Child Child Hash: 9d388dea6bd43ac605cd Asset Size Chunks Chunk Names - ./bundle-hidden-source-map.js 644 bytes 0 [emitted] bundle - ./manifest-hidden-source-map.js 5.8 kB 1 [emitted] manifest + ./bundle-hidden-source-map.js 645 bytes 0 [emitted] bundle + ./manifest-hidden-source-map.js 3.84 kB 1 [emitted] manifest ./bundle-hidden-source-map.js.map 604 bytes 0 [emitted] bundle - ./manifest-hidden-source-map.js.map 5.93 kB 1 [emitted] manifest + ./manifest-hidden-source-map.js.map 3.96 kB 1 [emitted] manifest Entrypoint bundle = ./manifest-hidden-source-map.js ./manifest-hidden-source-map.js.map ./bundle-hidden-source-map.js ./bundle-hidden-source-map.js.map chunk {0} ./bundle-hidden-source-map.js, ./bundle-hidden-source-map.js.map (bundle) 308 bytes {1} [initial] [rendered] > bundle [0] (webpack)/node_modules/coffee-loader!./example.coffee @@ -327,7 +327,7 @@ Child Hash: d4e103e888cf20eaf6f7 Asset Size Chunks Chunk Names ./bundle-inline-source-map.js 1.52 kB 0 [emitted] bundle - ./manifest-inline-source-map.js 13.8 kB 1 [emitted] manifest + ./manifest-inline-source-map.js 9.19 kB 1 [emitted] manifest Entrypoint bundle = ./manifest-inline-source-map.js ./bundle-inline-source-map.js chunk {0} ./bundle-inline-source-map.js (bundle) 308 bytes {1} [initial] [rendered] > bundle [0] (webpack)/node_modules/coffee-loader!./example.coffee @@ -336,10 +336,10 @@ Child Child Hash: 5dc2d2924e3fdc22d688 Asset Size Chunks Chunk Names - ./bundle-nosources-source-map.js 700 bytes 0 [emitted] bundle - ./manifest-nosources-source-map.js 5.86 kB 1 [emitted] manifest + ./bundle-nosources-source-map.js 701 bytes 0 [emitted] bundle + ./manifest-nosources-source-map.js 3.9 kB 1 [emitted] manifest ./bundle-nosources-source-map.js.map 315 bytes 0 [emitted] bundle - ./manifest-nosources-source-map.js.map 935 bytes 1 [emitted] manifest + ./manifest-nosources-source-map.js.map 687 bytes 1 [emitted] manifest Entrypoint bundle = ./manifest-nosources-source-map.js ./manifest-nosources-source-map.js.map ./bundle-nosources-source-map.js ./bundle-nosources-source-map.js.map chunk {0} ./bundle-nosources-source-map.js, ./bundle-nosources-source-map.js.map (bundle) 308 bytes {1} [initial] [rendered] > bundle [0] (webpack)/node_modules/coffee-loader!./example.coffee @@ -348,10 +348,10 @@ Child Child Hash: 9086c1479edc2c87f028 Asset Size Chunks Chunk Names - ./bundle-source-map.js 690 bytes 0 [emitted] bundle - ./manifest-source-map.js 5.84 kB 1 [emitted] manifest + ./bundle-source-map.js 691 bytes 0 [emitted] bundle + ./manifest-source-map.js 3.89 kB 1 [emitted] manifest ./bundle-source-map.js.map 597 bytes 0 [emitted] bundle - ./manifest-source-map.js.map 5.92 kB 1 [emitted] manifest + ./manifest-source-map.js.map 3.95 kB 1 [emitted] manifest Entrypoint bundle = ./manifest-source-map.js ./manifest-source-map.js.map ./bundle-source-map.js ./bundle-source-map.js.map chunk {0} ./bundle-source-map.js, ./bundle-source-map.js.map (bundle) 308 bytes {1} [initial] [rendered] > bundle [0] (webpack)/node_modules/coffee-loader!./example.coffee diff --git a/examples/two-explicit-vendor-chunks/README.md b/examples/two-explicit-vendor-chunks/README.md index 72fd9325c..538a3edb8 100644 --- a/examples/two-explicit-vendor-chunks/README.md +++ b/examples/two-explicit-vendor-chunks/README.md @@ -92,55 +92,6 @@ module.exports = { /******/ return module.exports; /******/ } /******/ -/******/ // This file contains only the entry chunk. -/******/ // The chunk loading function for additional chunks -/******/ __webpack_require__.e = function requireEnsure(chunkId) { -/******/ var installedChunkData = installedChunks[chunkId]; -/******/ if(installedChunkData === 0) { -/******/ return new Promise(function(resolve) { resolve(); }); -/******/ } -/******/ -/******/ // a Promise means "currently loading". -/******/ if(installedChunkData) { -/******/ return installedChunkData[2]; -/******/ } -/******/ -/******/ // setup Promise in chunk cache -/******/ var promise = new Promise(function(resolve, reject) { -/******/ installedChunkData = installedChunks[chunkId] = [resolve, reject]; -/******/ }); -/******/ installedChunkData[2] = promise; -/******/ -/******/ // start chunk loading -/******/ var head = document.getElementsByTagName('head')[0]; -/******/ var script = document.createElement('script'); -/******/ script.type = 'text/javascript'; -/******/ script.charset = 'utf-8'; -/******/ script.async = true; -/******/ script.timeout = 120000; -/******/ -/******/ if (__webpack_require__.nc) { -/******/ script.setAttribute("nonce", __webpack_require__.nc); -/******/ } -/******/ script.src = __webpack_require__.p + "" + chunkId + ".js"; -/******/ var timeout = setTimeout(onScriptComplete, 120000); -/******/ script.onerror = script.onload = onScriptComplete; -/******/ function onScriptComplete() { -/******/ // avoid mem leaks in IE. -/******/ script.onerror = script.onload = null; -/******/ clearTimeout(timeout); -/******/ var chunk = installedChunks[chunkId]; -/******/ if(chunk !== 0) { -/******/ if(chunk) { -/******/ chunk[1](new Error('Loading chunk ' + chunkId + ' failed.')); -/******/ } -/******/ installedChunks[chunkId] = undefined; -/******/ } -/******/ }; -/******/ head.appendChild(script); -/******/ -/******/ return promise; -/******/ }; /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; @@ -191,7 +142,7 @@ module.exports = { /*!********************!*\ !*** ./vendor1.js ***! \********************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -203,7 +154,7 @@ module.exports = "Vendor1"; /*!***********************!*\ !*** multi ./vendor1 ***! \***********************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -223,7 +174,7 @@ webpackJsonp([0],[ /*!********************!*\ !*** ./vendor2.js ***! \********************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -237,7 +188,7 @@ __webpack_require__(/*! ./vendor1 */ 0); /*!***********************!*\ !*** multi ./vendor2 ***! \***********************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -257,7 +208,7 @@ webpackJsonp([3],{ /*!******************!*\ !*** ./pageA.js ***! \******************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -277,13 +228,13 @@ __webpack_require__(/*! ./vendor2 */ 1); ``` Hash: 87020004ae57cbfa3361 -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names -vendor2.js 598 bytes 0 [emitted] vendor2 - pageC.js 235 bytes 1 [emitted] pageC - pageB.js 235 bytes 2 [emitted] pageB - pageA.js 342 bytes 3 [emitted] pageA -vendor1.js 6.41 kB 4 [emitted] vendor1 +vendor2.js 600 bytes 0 [emitted] vendor2 + pageC.js 236 bytes 1 [emitted] pageC + pageB.js 236 bytes 2 [emitted] pageB + pageA.js 343 bytes 3 [emitted] pageA +vendor1.js 4.47 kB 4 [emitted] vendor1 Entrypoint vendor1 = vendor1.js Entrypoint vendor2 = vendor1.js vendor2.js Entrypoint pageA = vendor1.js vendor2.js pageA.js @@ -317,13 +268,13 @@ chunk {4} vendor1.js (vendor1) 55 bytes [entry] [rendered] ``` Hash: 87020004ae57cbfa3361 -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names vendor2.js 100 bytes 0 [emitted] vendor2 pageC.js 59 bytes 1 [emitted] pageC pageB.js 59 bytes 2 [emitted] pageB pageA.js 71 bytes 3 [emitted] pageA -vendor1.js 1.44 kB 4 [emitted] vendor1 +vendor1.js 877 bytes 4 [emitted] vendor1 Entrypoint vendor1 = vendor1.js Entrypoint vendor2 = vendor1.js vendor2.js Entrypoint pageA = vendor1.js vendor2.js pageA.js diff --git a/examples/web-worker/README.md b/examples/web-worker/README.md index 3473f86ed..c8d3646c9 100644 --- a/examples/web-worker/README.md +++ b/examples/web-worker/README.md @@ -101,7 +101,7 @@ onmessage = function(event) { /*!********************!*\ !*** ./example.js ***! \********************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -118,7 +118,7 @@ worker.onmessage = function(event) { /*!********************************************************!*\ !*** (webpack)/node_modules/worker-loader!./worker.js ***! \********************************************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -228,15 +228,15 @@ module.exports = function() { /*!*******************!*\ !*** ./worker.js ***! \*******************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { onmessage = function(event) { var template = event.data; - __webpack_require__.e/* require */(0).then(function() { var __WEBPACK_AMD_REQUIRE_ARRAY__ = [__webpack_require__(/*! ../require.context/templates */ 1)("./" + event.data)]; (function(tmpl) { + __webpack_require__.e/* require */(0).then(function() { var __WEBPACK_AMD_REQUIRE_ARRAY__ = [__webpack_require__(/*! ../require.context/templates */ 1)("./" + event.data)]; ((function(tmpl) { postMessage(tmpl()); - }.apply(null, __WEBPACK_AMD_REQUIRE_ARRAY__));}).catch(__webpack_require__.oe); + }).apply(null, __WEBPACK_AMD_REQUIRE_ARRAY__));}).catch(__webpack_require__.oe); } @@ -253,7 +253,7 @@ webpackChunk([0],[ /*!*********************************************!*\ !*** ../require.context/templates ^\.\/.*$ ***! \*********************************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports, __webpack_require__) { @@ -286,7 +286,7 @@ webpackContext.id = 1; /*!*****************************************!*\ !*** ../require.context/templates/a.js ***! \*****************************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -299,7 +299,7 @@ module.exports = function() { /*!*****************************************!*\ !*** ../require.context/templates/b.js ***! \*****************************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -312,7 +312,7 @@ module.exports = function() { /*!*****************************************!*\ !*** ../require.context/templates/c.js ***! \*****************************************/ -/*! no static exports found */ +/*! dynamic exports provided */ /*! all exports used */ /***/ (function(module, exports) { @@ -330,11 +330,11 @@ module.exports = function() { ``` Hash: de5e6c34dad6f90c6640 -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names -0.hash.worker.js 1.85 kB [emitted] +0.hash.worker.js 1.86 kB [emitted] hash.worker.js 3.91 kB [emitted] - output.js 3.27 kB 0 [emitted] main + output.js 3.28 kB 0 [emitted] main Entrypoint main = output.js chunk {0} output.js (main) 311 bytes [entry] [rendered] > main [0] ./example.js @@ -343,7 +343,7 @@ chunk {0} output.js (main) 311 bytes [entry] [rendered] cjs require worker-loader!./worker [0] ./example.js 1:13-46 Child worker: Asset Size Chunks Chunk Names - 0.hash.worker.js 1.85 kB 0 [emitted] + 0.hash.worker.js 1.86 kB 0 [emitted] hash.worker.js 3.91 kB 1 [emitted] main Entrypoint main = hash.worker.js chunk {0} 0.hash.worker.js 463 bytes {1} [rendered] @@ -368,7 +368,7 @@ Child worker: ``` Hash: de5e6c34dad6f90c6640 -Version: webpack 3.5.1 +Version: webpack 3.11.0 Asset Size Chunks Chunk Names 0.hash.worker.js 544 bytes [emitted] hash.worker.js 811 bytes [emitted] From 864e5631738b79c3a70204deda756b81e6eb566d Mon Sep 17 00:00:00 2001 From: Suguru Motegi Date: Sat, 10 Feb 2018 20:27:09 -0800 Subject: [PATCH 072/112] replace Async with Neo-Async --- examples/build-common.js | 2 +- lib/AutomaticPrefetchPlugin.js | 2 +- lib/CachePlugin.js | 2 +- lib/Compilation.js | 2 +- lib/Compiler.js | 5 ++--- lib/ContextModuleFactory.js | 2 +- lib/LibManifestPlugin.js | 2 +- lib/MultiCompiler.js | 2 +- lib/MultiWatching.js | 2 +- lib/NormalModuleFactory.js | 2 +- package.json | 2 +- test/BenchmarkTestCases.benchmark.js | 2 +- test/cases/loaders/issue-2299/loader/index.js | 2 +- yarn.lock | 4 ++++ 14 files changed, 18 insertions(+), 15 deletions(-) diff --git a/examples/build-common.js b/examples/build-common.js index 19de54f54..afca1e4d7 100644 --- a/examples/build-common.js +++ b/examples/build-common.js @@ -8,7 +8,7 @@ const cp = require("child_process"); const path = require("path"); const tc = require("./template-common"); const fs = require("fs"); -const async = require("async"); +const async = require("neo-async"); const extraArgs = ""; diff --git a/lib/AutomaticPrefetchPlugin.js b/lib/AutomaticPrefetchPlugin.js index 6989d6228..fd0c75609 100644 --- a/lib/AutomaticPrefetchPlugin.js +++ b/lib/AutomaticPrefetchPlugin.js @@ -4,7 +4,7 @@ */ "use strict"; -const asyncLib = require("async"); +const asyncLib = require("neo-async"); const PrefetchDependency = require("./dependencies/PrefetchDependency"); const NormalModule = require("./NormalModule"); diff --git a/lib/CachePlugin.js b/lib/CachePlugin.js index 161418de8..4a11e02ed 100644 --- a/lib/CachePlugin.js +++ b/lib/CachePlugin.js @@ -4,7 +4,7 @@ */ "use strict"; -const asyncLib = require("async"); +const asyncLib = require("neo-async"); class CachePlugin { constructor(cache) { diff --git a/lib/Compilation.js b/lib/Compilation.js index b8ebbd879..6fcbf42e0 100644 --- a/lib/Compilation.js +++ b/lib/Compilation.js @@ -4,7 +4,7 @@ */ "use strict"; -const asyncLib = require("async"); +const asyncLib = require("neo-async"); const util = require("util"); const Tapable = require("tapable").Tapable; const SyncHook = require("tapable").SyncHook; diff --git a/lib/Compiler.js b/lib/Compiler.js index bc54f681b..2787734e6 100644 --- a/lib/Compiler.js +++ b/lib/Compiler.js @@ -4,7 +4,7 @@ */ "use strict"; -const asyncLib = require("async"); +const asyncLib = require("neo-async"); const path = require("path"); const util = require("util"); const Tapable = require("tapable").Tapable; @@ -255,7 +255,7 @@ class Compiler extends Tapable { const emitFiles = (err) => { if(err) return callback(err); - asyncLib.forEach(Object.keys(compilation.assets), (file, callback) => { + asyncLib.forEach(compilation.assets, (source, file, callback) => { let targetFile = file; const queryStringIdx = targetFile.indexOf("?"); @@ -266,7 +266,6 @@ class Compiler extends Tapable { const writeOut = (err) => { if(err) return callback(err); const targetPath = this.outputFileSystem.join(outputPath, targetFile); - const source = compilation.assets[file]; if(source.existsAt === targetPath) { source.emitted = false; return callback(); diff --git a/lib/ContextModuleFactory.js b/lib/ContextModuleFactory.js index 2deddf23f..faadb758f 100644 --- a/lib/ContextModuleFactory.js +++ b/lib/ContextModuleFactory.js @@ -4,7 +4,7 @@ */ "use strict"; -const asyncLib = require("async"); +const asyncLib = require("neo-async"); const path = require("path"); const Tapable = require("tapable").Tapable; diff --git a/lib/LibManifestPlugin.js b/lib/LibManifestPlugin.js index 255e72244..d05e15ad2 100644 --- a/lib/LibManifestPlugin.js +++ b/lib/LibManifestPlugin.js @@ -5,7 +5,7 @@ "use strict"; const path = require("path"); -const asyncLib = require("async"); +const asyncLib = require("neo-async"); class LibManifestPlugin { constructor(options) { diff --git a/lib/MultiCompiler.js b/lib/MultiCompiler.js index 1686b4a5d..84165f904 100644 --- a/lib/MultiCompiler.js +++ b/lib/MultiCompiler.js @@ -7,7 +7,7 @@ const Tapable = require("tapable").Tapable; const SyncHook = require("tapable").SyncHook; const MultiHook = require("tapable").MultiHook; -const asyncLib = require("async"); +const asyncLib = require("neo-async"); const MultiWatching = require("./MultiWatching"); const MultiStats = require("./MultiStats"); diff --git a/lib/MultiWatching.js b/lib/MultiWatching.js index 35afe85dd..0e586d936 100644 --- a/lib/MultiWatching.js +++ b/lib/MultiWatching.js @@ -4,7 +4,7 @@ */ "use strict"; -const asyncLib = require("async"); +const asyncLib = require("neo-async"); class MultiWatching { constructor(watchings, compiler) { diff --git a/lib/NormalModuleFactory.js b/lib/NormalModuleFactory.js index 74fb3b6e5..df3f844a8 100644 --- a/lib/NormalModuleFactory.js +++ b/lib/NormalModuleFactory.js @@ -4,7 +4,7 @@ */ "use strict"; -const asyncLib = require("async"); +const asyncLib = require("neo-async"); const Tapable = require("tapable").Tapable; const AsyncSeriesWaterfallHook = require("tapable").AsyncSeriesWaterfallHook; const SyncWaterfallHook = require("tapable").SyncWaterfallHook; diff --git a/package.json b/package.json index 0e33b9bb5..0233ff867 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,6 @@ "acorn-dynamic-import": "^3.0.0", "ajv": "^6.1.0", "ajv-keywords": "^3.1.0", - "async": "^2.1.2", "chrome-trace-event": "^0.1.1", "enhanced-resolve": "^4.0.0-beta.2", "eslint-scope": "^3.7.1", @@ -17,6 +16,7 @@ "loader-utils": "^1.1.0", "memory-fs": "~0.4.1", "mkdirp": "~0.5.0", + "neo-async": "^2.5.0", "node-libs-browser": "^2.0.0", "schema-utils": "^0.4.2", "tapable": "^1.0.0-beta.5", diff --git a/test/BenchmarkTestCases.benchmark.js b/test/BenchmarkTestCases.benchmark.js index 0754f9d35..f626a6304 100644 --- a/test/BenchmarkTestCases.benchmark.js +++ b/test/BenchmarkTestCases.benchmark.js @@ -3,7 +3,7 @@ require("should"); const path = require("path"); const fs = require("fs"); -const asyncLib = require("async"); +const asyncLib = require("neo-async"); var Test = require("mocha/lib/test"); const Benchmark = require("benchmark"); diff --git a/test/cases/loaders/issue-2299/loader/index.js b/test/cases/loaders/issue-2299/loader/index.js index 6b2edcda0..cb27f7cf2 100644 --- a/test/cases/loaders/issue-2299/loader/index.js +++ b/test/cases/loaders/issue-2299/loader/index.js @@ -1,4 +1,4 @@ -var asyncLib = require("async"); +var asyncLib = require("neo-async"); module.exports = function(content) { var cb = this.async(); var json = JSON.parse(content); diff --git a/yarn.lock b/yarn.lock index d1ecc038b..bfa39cfcf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2616,6 +2616,10 @@ negotiator@0.5.3: version "0.5.3" resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.5.3.tgz#269d5c476810ec92edbe7b6c2f28316384f9a7e8" +neo-async@^2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.5.0.tgz#76b1c823130cca26acfbaccc8fbaf0a2fa33b18f" + node-fetch@^1.0.1: version "1.7.3" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef" From 9599e4eb61ea7055a59b2ab3855bf592fbe77cf3 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Tue, 13 Feb 2018 12:38:10 +0100 Subject: [PATCH 073/112] fix typo: mergedDuplicateChunks -> mergeDuplicateChunks --- lib/WebpackOptionsApply.js | 2 +- lib/WebpackOptionsDefaulter.js | 2 +- schemas/WebpackOptions.json | 2 +- test/TestCases.test.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/WebpackOptionsApply.js b/lib/WebpackOptionsApply.js index a24a91ac9..8ef9dcda2 100644 --- a/lib/WebpackOptionsApply.js +++ b/lib/WebpackOptionsApply.js @@ -274,7 +274,7 @@ class WebpackOptionsApply extends OptionsApply { new RemoveParentModulesPlugin().apply(compiler); if(options.optimization.removeEmptyChunks) new RemoveEmptyChunksPlugin().apply(compiler); - if(options.optimization.mergedDuplicateChunks) + if(options.optimization.mergeDuplicateChunks) new MergeDuplicateChunksPlugin().apply(compiler); if(options.optimization.flagIncludedChunks) new FlagIncludedChunksPlugin().apply(compiler); diff --git a/lib/WebpackOptionsDefaulter.js b/lib/WebpackOptionsDefaulter.js index e66556c7e..b158bf667 100644 --- a/lib/WebpackOptionsDefaulter.js +++ b/lib/WebpackOptionsDefaulter.js @@ -160,7 +160,7 @@ class WebpackOptionsDefaulter extends OptionsDefaulter { this.set("optimization.removeAvailableModules", true); this.set("optimization.removeEmptyChunks", true); - this.set("optimization.mergedDuplicateChunks", true); + this.set("optimization.mergeDuplicateChunks", true); this.set("optimization.flagIncludedChunks", "make", options => isProductionLikeMode(options)); this.set("optimization.occurrenceOrder", "make", options => isProductionLikeMode(options)); this.set("optimization.sideEffects", "make", options => isProductionLikeMode(options)); diff --git a/schemas/WebpackOptions.json b/schemas/WebpackOptions.json index 4326589af..93969552e 100644 --- a/schemas/WebpackOptions.json +++ b/schemas/WebpackOptions.json @@ -1295,7 +1295,7 @@ "description": "Remove chunks which are empty", "type": "boolean" }, - "mergedDuplicateChunks": { + "mergeDuplicateChunks": { "description": "Merge chunks which contain the same modules", "type": "boolean" }, diff --git a/test/TestCases.test.js b/test/TestCases.test.js index b34c2cc09..a0d1ee450 100644 --- a/test/TestCases.test.js +++ b/test/TestCases.test.js @@ -15,7 +15,7 @@ const webpack = require("../lib/webpack"); const DEFAULT_OPTIMIZATIONS = { removeAvailableModules: true, removeEmptyChunks: true, - mergedDuplicateChunks: true, + mergeDuplicateChunks: true, flagIncludedChunks: true, occurrenceOrder: true, sideEffects: true, From fb4b275dc94a8b3bf9c4967a8a4ad9a7f7c80447 Mon Sep 17 00:00:00 2001 From: EugeneHlushko Date: Tue, 13 Feb 2018 19:13:07 +0200 Subject: [PATCH 074/112] Improvement: add schema for profiling plugin options, remove todo item --- lib/debug/ProfilingPlugin.js | 4 +- schemas/plugins/debug/ProfilingPlugin.json | 13 +++ .../plugins/optimize/CommonsChunkPlugin.json | 88 ------------------- 3 files changed, 16 insertions(+), 89 deletions(-) create mode 100644 schemas/plugins/debug/ProfilingPlugin.json delete mode 100644 schemas/plugins/optimize/CommonsChunkPlugin.json diff --git a/lib/debug/ProfilingPlugin.js b/lib/debug/ProfilingPlugin.js index 3b3aeffeb..2f9e13288 100644 --- a/lib/debug/ProfilingPlugin.js +++ b/lib/debug/ProfilingPlugin.js @@ -131,10 +131,12 @@ function createTrace(outPath) { } const pluginName = "ProfilingPlugin"; +const validateOptions = require("schema-utils"); +const schema = require("../../schemas/plugins/debug/ProfilingPlugin.json"); class ProfilingPlugin { - // TODO: Add plugin schema validation here since there are options. constructor(opts) { + validateOptions(schema, opts || {}, "Profiling plugin"); opts = opts || {}; this.outPath = opts.outPath || "events.json"; } diff --git a/schemas/plugins/debug/ProfilingPlugin.json b/schemas/plugins/debug/ProfilingPlugin.json new file mode 100644 index 000000000..a01317355 --- /dev/null +++ b/schemas/plugins/debug/ProfilingPlugin.json @@ -0,0 +1,13 @@ +{ + "id": "ProfilingPlugin", + "type": "object", + "additionalProperties": false, + "properties": { + "outPath": { + "description": "Path to the output file e.g. `profiling/events.json`. Defaults to `events.json`.", + "type": "string", + "absolutePath": true, + "minLength": 4 + } + } +} diff --git a/schemas/plugins/optimize/CommonsChunkPlugin.json b/schemas/plugins/optimize/CommonsChunkPlugin.json deleted file mode 100644 index 859075590..000000000 --- a/schemas/plugins/optimize/CommonsChunkPlugin.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "id": "CommonsChunkPlugin", - "oneOf": [ - { - "description": "The chunk name of the commons chunk", - "minLength": 1, - "type": "string" - }, - { - "description": "The chunk names of the commons chunk", - "type": "array", - "items": { - "description": "Chunk name", - "minLength": 1, - "type": "string" - } - }, - { - "type": "object", - "additionalProperties": false, - "properties": { - "name": { - "description": "The chunk name of the commons chunk", - "minLength": 1, - "type": "string" - }, - "names": { - "description": "The chunk names of the commons chunk", - "type": "array", - "items": { - "description": "Chunk name", - "minLength": 1, - "type": "string" - } - }, - "filename": { - "description": "The filename template for the commons chunk", - "minLength": 1, - "type": "string" - }, - "minChunks": { - "description": "The minimum number of chunks which need to contain a module before it's moved into the commons chunk", - "oneOf": [ - { - "type": "number" - }, - { - "instanceof": "Function" - } - ] - }, - "chunks": { - "description": "Select the source chunks by chunk names", - "type": "array", - "items": { - "description": "Chunk name", - "minLength": 1, - "type": "string" - } - }, - "children": { - "description": "If `true` all children of the commons chunk are selected", - "type": "boolean" - }, - "deepChildren": { - "description": "If `true` all descendants of the commons chunk are selected", - "type": "boolean" - }, - "async": { - "description": "If `true` a new async commons chunk is created as child of `options.name` and sibling of `options.chunks`. Instead of using `option.filename`, it is possible to change the name of the output file by providing the desired string here instead of `true`", - "oneOf": [ - { - "type": "boolean" - }, - { - "minLength": 1, - "type": "string" - } - ] - }, - "minSize": { - "description": "Minimum size of all common module before a commons chunk is created", - "type": "number" - } - } - } - ] -} From e8b9b22f450ea74a32a1b27bfadadfce14b1a7aa Mon Sep 17 00:00:00 2001 From: Sean Larkin Date: Tue, 13 Feb 2018 12:50:16 -0800 Subject: [PATCH 075/112] Set nodeEnv to default to "production" --- lib/WebpackOptionsDefaulter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/WebpackOptionsDefaulter.js b/lib/WebpackOptionsDefaulter.js index b158bf667..0fb060b7f 100644 --- a/lib/WebpackOptionsDefaulter.js +++ b/lib/WebpackOptionsDefaulter.js @@ -213,7 +213,7 @@ class WebpackOptionsDefaulter extends OptionsDefaulter { }).apply(compiler); } }]); - this.set("optimization.nodeEnv", "make", options => options.mode); + this.set("optimization.nodeEnv", "make", options => options.mode || "production") this.set("resolve", "call", value => Object.assign({}, value)); this.set("resolve.unsafeCache", true); From 331c0110091542ec2cf39e00cf9148bf5797c436 Mon Sep 17 00:00:00 2001 From: Sean Larkin Date: Tue, 13 Feb 2018 13:17:55 -0800 Subject: [PATCH 076/112] Update WebpackOptionsDefaulter.js --- lib/WebpackOptionsDefaulter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/WebpackOptionsDefaulter.js b/lib/WebpackOptionsDefaulter.js index 0fb060b7f..a3b5ee65a 100644 --- a/lib/WebpackOptionsDefaulter.js +++ b/lib/WebpackOptionsDefaulter.js @@ -213,7 +213,7 @@ class WebpackOptionsDefaulter extends OptionsDefaulter { }).apply(compiler); } }]); - this.set("optimization.nodeEnv", "make", options => options.mode || "production") + this.set("optimization.nodeEnv", "make", options => options.mode || "production"); this.set("resolve", "call", value => Object.assign({}, value)); this.set("resolve.unsafeCache", true); From a8e97d844a133203792c64cd4aa7c05e188e4212 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Tue, 13 Feb 2018 15:42:02 -0800 Subject: [PATCH 077/112] Added missing Serial Comma to issue template :gasp: --- .github/ISSUE_TEMPLATE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 98922e445..1deb4adab 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -19,4 +19,4 @@ **If this is a feature request, what is motivation or use case for changing the behavior?** -**Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System.** +**Please mention other relevant information such as the browser version, Node.js version, webpack version, and Operating System.** From e4d55443c9ae3ec89482796a522f31c5381cf624 Mon Sep 17 00:00:00 2001 From: Clayton Ray Date: Tue, 13 Feb 2018 22:23:24 -0500 Subject: [PATCH 078/112] chore(docs): Update readme Looks like the website doesn't exist anymore so no reason to send people to a location that redirects to webpack.js.org anyway --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2db442915..63e9ba78b 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ yarn add webpack --dev

Introduction

-> This README reflects Webpack v2.x and v3.x. The Webpack v1.x [documentation can be found here](https://webpack.github.io/docs/?utm_source=github&utm_medium=readme&utm_campaign=top). +> This README reflects Webpack v2.x and v3.x. The Webpack v1.x documentation has been deprecated and deleted. webpack is a bundler for modules. The main purpose is to bundle JavaScript files for usage in a browser, yet it is also capable of transforming, bundling, From 97cd2dde7055bd337f4f7f672898dd5decc531ea Mon Sep 17 00:00:00 2001 From: EugeneHlushko Date: Wed, 14 Feb 2018 09:49:15 +0200 Subject: [PATCH 079/112] Improvement: add schema for profiling plugin options, remove todo item: abs path to false --- lib/debug/ProfilingPlugin.js | 4 ++-- schemas/plugins/debug/ProfilingPlugin.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/debug/ProfilingPlugin.js b/lib/debug/ProfilingPlugin.js index 2f9e13288..aca0f8bcd 100644 --- a/lib/debug/ProfilingPlugin.js +++ b/lib/debug/ProfilingPlugin.js @@ -1,5 +1,7 @@ const fs = require("fs"); const Trace = require("chrome-trace-event").Tracer; +const validateOptions = require("schema-utils"); +const schema = require("../../schemas/plugins/debug/ProfilingPlugin.json"); let inspector = undefined; try { @@ -131,8 +133,6 @@ function createTrace(outPath) { } const pluginName = "ProfilingPlugin"; -const validateOptions = require("schema-utils"); -const schema = require("../../schemas/plugins/debug/ProfilingPlugin.json"); class ProfilingPlugin { constructor(opts) { diff --git a/schemas/plugins/debug/ProfilingPlugin.json b/schemas/plugins/debug/ProfilingPlugin.json index a01317355..98c825cf5 100644 --- a/schemas/plugins/debug/ProfilingPlugin.json +++ b/schemas/plugins/debug/ProfilingPlugin.json @@ -6,7 +6,7 @@ "outPath": { "description": "Path to the output file e.g. `profiling/events.json`. Defaults to `events.json`.", "type": "string", - "absolutePath": true, + "absolutePath": false, "minLength": 4 } } From f33cf76608ca8e9dd2b015b4f5164c569a7af2eb Mon Sep 17 00:00:00 2001 From: EugeneHlushko Date: Wed, 14 Feb 2018 10:29:29 +0200 Subject: [PATCH 080/112] Improvement: add schema for profiling plugin options, remove todo item: add docs, rename option --- lib/debug/ProfilingPlugin.js | 21 +++++---------------- schemas/plugins/debug/ProfilingPlugin.json | 2 +- 2 files changed, 6 insertions(+), 17 deletions(-) diff --git a/lib/debug/ProfilingPlugin.js b/lib/debug/ProfilingPlugin.js index aca0f8bcd..a563e1a98 100644 --- a/lib/debug/ProfilingPlugin.js +++ b/lib/debug/ProfilingPlugin.js @@ -10,17 +10,6 @@ try { console.log("Unable to CPU profile in < node 8.0"); } -// TODO: Add this to webpack.js.org docs for this plugin, and for profiling build times -/** - * How this plugin works: (placeholder until in docs) - * - * In chrome, open the `Profile Tab`, when you run webpack, - * this plugin will output an events.json file that you - * can drag and drop into the profiler. It will then display timeline stats and calls per plugin! - * - * Example: https://chromedevtools.github.io/timeline-viewer/?url=https%3A%2F%2Fgist.githubusercontent.com%2FTheLarkInn%2Fb94b728fa5e22f62c312e110a9944768%2Fraw%2Fcb672fb3f661a17576803e41db6030382b1a0fc9%2Fevents.json&loadTimelineFromURL=drive://163GY-H0wvF9rSrlwjJcrdTL-YLnppp55 - */ - class Profiler { constructor(inspector) { this.session = undefined; @@ -83,10 +72,10 @@ class Profiler { } /** - * @param {string} outPath The location where to write the log. + * @param {string} outputPath The location where to write the log. * @returns {{trace: ?, counter: number, profiler: Profiler}} The trace object */ -function createTrace(outPath) { +function createTrace(outputPath) { const trace = new Trace({ noStream: true }); @@ -94,7 +83,7 @@ function createTrace(outPath) { let counter = 0; - trace.pipe(fs.createWriteStream(outPath)); + trace.pipe(fs.createWriteStream(outputPath)); // These are critical events that need to be inserted so that tools like // chrome dev tools can load the profile. trace.instantEvent({ @@ -138,11 +127,11 @@ class ProfilingPlugin { constructor(opts) { validateOptions(schema, opts || {}, "Profiling plugin"); opts = opts || {}; - this.outPath = opts.outPath || "events.json"; + this.outputPath = opts.outputPath || "events.json"; } apply(compiler) { - const tracer = createTrace(this.outPath); + const tracer = createTrace(this.outputPath); tracer.profiler.startProfiling(); // Compiler Hooks diff --git a/schemas/plugins/debug/ProfilingPlugin.json b/schemas/plugins/debug/ProfilingPlugin.json index 98c825cf5..20bbdc9df 100644 --- a/schemas/plugins/debug/ProfilingPlugin.json +++ b/schemas/plugins/debug/ProfilingPlugin.json @@ -3,7 +3,7 @@ "type": "object", "additionalProperties": false, "properties": { - "outPath": { + "outputPath": { "description": "Path to the output file e.g. `profiling/events.json`. Defaults to `events.json`.", "type": "string", "absolutePath": false, From 3d7a28408274c4d41a1a462c4bce7a35b281b69b Mon Sep 17 00:00:00 2001 From: EugeneHlushko Date: Wed, 14 Feb 2018 10:32:31 +0200 Subject: [PATCH 081/112] Improvement: add schema for profiling plugin options, remove todo item: update tests --- test/ProfilingPlugin.unittest.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/ProfilingPlugin.unittest.js b/test/ProfilingPlugin.unittest.js index 9d7746957..9698f185e 100644 --- a/test/ProfilingPlugin.unittest.js +++ b/test/ProfilingPlugin.unittest.js @@ -6,14 +6,14 @@ const ProfilingPlugin = require("../lib/debug/ProfilingPlugin"); describe("Profiling Plugin", () => { it("should persist the passed outpath", () => { const plugin = new ProfilingPlugin({ - outPath: "invest_in_doge_coin" + outputPath: "invest_in_doge_coin" }); - plugin.outPath.should.equal("invest_in_doge_coin"); + plugin.outputPath.should.equal("invest_in_doge_coin"); }); it("should handle no options", () => { const plugin = new ProfilingPlugin(); - plugin.outPath.should.equal("events.json"); + plugin.outputPath.should.equal("events.json"); }); it("should handle when unable to require the inspector", (done) => { From abc3238d01663bb1da606f79b2b16366fc90f49b Mon Sep 17 00:00:00 2001 From: EugeneHlushko Date: Wed, 14 Feb 2018 10:33:49 +0200 Subject: [PATCH 082/112] Improvement: add schema for profiling plugin options, remove todo item: update tests --- test/configCases/plugins/profiling-plugin/webpack.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/configCases/plugins/profiling-plugin/webpack.config.js b/test/configCases/plugins/profiling-plugin/webpack.config.js index c27f11352..58933fe41 100644 --- a/test/configCases/plugins/profiling-plugin/webpack.config.js +++ b/test/configCases/plugins/profiling-plugin/webpack.config.js @@ -6,7 +6,7 @@ var os = require("os"); module.exports = { plugins: [ new webpack.debug.ProfilingPlugin({ - outPath: path.join(os.tmpdir(), "events.json") + outputPath: path.join(os.tmpdir(), "events.json") }) ], node: { From a31420fd78f8696a1247afe4626e3a3289d643a9 Mon Sep 17 00:00:00 2001 From: Lewis Cowper Date: Fri, 16 Feb 2018 16:08:09 +0100 Subject: [PATCH 083/112] Fix typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2db442915..7a58c1566 100644 --- a/README.md +++ b/README.md @@ -432,7 +432,7 @@ src="https://static.monei.net/monei-logo.svg" height="30" alt="MONEI">

Silver Sponsors

-[Become a sliver sponsor](https://opencollective.com/webpack#sponsor) and get your logo on our README on Github with a link to your site. +[Become a silver sponsor](https://opencollective.com/webpack#sponsor) and get your logo on our README on Github with a link to your site.
From 1e73752fb2e7f3ac106f06a4822e54573e1da8d6 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Fri, 16 Feb 2018 09:12:01 +0100 Subject: [PATCH 084/112] improve chunk splitting by also trying to select combinations of module chunks (limited by complexity) fix size ordering (was reversed) add chunk cound ordering --- lib/WebpackOptionsDefaulter.js | 1 + lib/optimize/SplitChunksPlugin.js | 119 ++++++---- schemas/WebpackOptions.json | 5 + .../async-commons-chunk-auto/expected.txt | 216 +++++++++--------- .../statsCases/split-chunks-combinations/a.js | 3 + .../statsCases/split-chunks-combinations/b.js | 3 + .../statsCases/split-chunks-combinations/c.js | 2 + .../statsCases/split-chunks-combinations/d.js | 1 + .../statsCases/split-chunks-combinations/e.js | 1 + .../split-chunks-combinations/expected.txt | 19 ++ .../statsCases/split-chunks-combinations/f.js | 1 + .../split-chunks-combinations/index.js | 3 + .../webpack.config.js | 25 ++ .../split-chunks-prefer-bigger-splits/a.js | 3 + .../split-chunks-prefer-bigger-splits/b.js | 4 + .../split-chunks-prefer-bigger-splits/c.js | 3 + .../split-chunks-prefer-bigger-splits/d.js | 1 + .../split-chunks-prefer-bigger-splits/e.js | 1 + .../expected.txt | 21 ++ .../split-chunks-prefer-bigger-splits/f.js | 1 + .../index.js | 3 + .../webpack.config.js | 25 ++ test/statsCases/split-chunks/expected.txt | 152 ++++++------ 23 files changed, 385 insertions(+), 228 deletions(-) create mode 100644 test/statsCases/split-chunks-combinations/a.js create mode 100644 test/statsCases/split-chunks-combinations/b.js create mode 100644 test/statsCases/split-chunks-combinations/c.js create mode 100644 test/statsCases/split-chunks-combinations/d.js create mode 100644 test/statsCases/split-chunks-combinations/e.js create mode 100644 test/statsCases/split-chunks-combinations/expected.txt create mode 100644 test/statsCases/split-chunks-combinations/f.js create mode 100644 test/statsCases/split-chunks-combinations/index.js create mode 100644 test/statsCases/split-chunks-combinations/webpack.config.js create mode 100644 test/statsCases/split-chunks-prefer-bigger-splits/a.js create mode 100644 test/statsCases/split-chunks-prefer-bigger-splits/b.js create mode 100644 test/statsCases/split-chunks-prefer-bigger-splits/c.js create mode 100644 test/statsCases/split-chunks-prefer-bigger-splits/d.js create mode 100644 test/statsCases/split-chunks-prefer-bigger-splits/e.js create mode 100644 test/statsCases/split-chunks-prefer-bigger-splits/expected.txt create mode 100644 test/statsCases/split-chunks-prefer-bigger-splits/f.js create mode 100644 test/statsCases/split-chunks-prefer-bigger-splits/index.js create mode 100644 test/statsCases/split-chunks-prefer-bigger-splits/webpack.config.js diff --git a/lib/WebpackOptionsDefaulter.js b/lib/WebpackOptionsDefaulter.js index a3b5ee65a..487fe2f3c 100644 --- a/lib/WebpackOptionsDefaulter.js +++ b/lib/WebpackOptionsDefaulter.js @@ -168,6 +168,7 @@ class WebpackOptionsDefaulter extends OptionsDefaulter { this.set("optimization.usedExports", "make", options => isProductionLikeMode(options)); this.set("optimization.concatenateModules", "make", options => isProductionLikeMode(options)); this.set("optimization.splitChunks", {}); + this.set("optimization.splitChunks.maxComplexity", "make", options => isProductionLikeMode(options) ? 3 : 1); this.set("optimization.splitChunks.chunks", "async"); this.set("optimization.splitChunks.minSize", 30000); this.set("optimization.splitChunks.minChunks", 1); diff --git a/lib/optimize/SplitChunksPlugin.js b/lib/optimize/SplitChunksPlugin.js index f3c3270d9..d5b59b842 100644 --- a/lib/optimize/SplitChunksPlugin.js +++ b/lib/optimize/SplitChunksPlugin.js @@ -40,18 +40,41 @@ const isOverlap = (a, b) => { return false; }; +const getCombinations = (array, maxDepth) => { + const results = []; + getCombinationsInteral(array, maxDepth, results); + return results; +}; + +const getCombinationsInteral = (array, maxDepth, results) => { + results.push(array); + if(maxDepth === 0 || array.length === 1) { + return; + } + for(let i = 0; i < array.length; i++) { + const newArray = array.slice(0, i).concat(array.slice(i + 1, array.length)); + getCombinationsInteral(newArray, maxDepth - 1, results); + } +}; + const compareEntries = (a, b) => { // 1. by priority const diffPriority = a.cacheGroup.priority - b.cacheGroup.priority; if(diffPriority) return diffPriority; - // 2. by total modules size - const diffSize = b.size - a.size; - if(diffSize) return diffSize; + // 2. by number of chunks + const diffCount = a.chunks.size - b.chunks.size; + if(diffCount) return diffCount; + // 3. by size reduction + const aSizeReduce = a.size * (a.chunks.size - 1); + const bSizeReduce = b.size * (b.chunks.size - 1); + const diffSizeReduce = aSizeReduce - bSizeReduce; + if(diffSizeReduce) return diffSizeReduce; + // 4. by number of modules (to be able to compare by identifier) const modulesA = a.modules; const modulesB = b.modules; - // 3. by module identifiers const diff = modulesA.size - modulesB.size; if(diff) return diff; + // 5. by module identifiers modulesA.sort(); modulesB.sort(); const aI = modulesA[Symbol.iterator](); @@ -74,6 +97,7 @@ module.exports = class SplitChunksPlugin { static normalizeOptions(options) { return { + maxComplexity: options.maxComplexity || 0, chunks: options.chunks || "all", minSize: options.minSize || 0, minChunks: options.minChunks || 1, @@ -226,47 +250,53 @@ module.exports = class SplitChunksPlugin { reuseExistingChunk: cacheGroupSource.reuseExistingChunk }; // Select chunks by configuration - const selectedChunks = cacheGroup.chunks === "initial" ? chunks.filter(chunk => chunk.canBeInitial()) : + const maxSelectedChunks = cacheGroup.chunks === "initial" ? chunks.filter(chunk => chunk.canBeInitial()) : cacheGroup.chunks === "async" ? chunks.filter(chunk => !chunk.canBeInitial()) : chunks; - // Get indices of chunks in which this module occurs - const chunkIndices = selectedChunks.map(chunk => indexMap.get(chunk)); - // Break if minimum number of chunks is not reached - if(chunkIndices.length < cacheGroup.minChunks) - continue; - // Determine name for split chunk - const name = cacheGroup.getName(module, selectedChunks, cacheGroup.key); - // Create key for maps - // When it has a name we use the name as key - // Elsewise we create the key from chunks and cache group key - // This automatically merges equal names - const chunksKey = chunkIndices.sort().join(); - const key = name && `name:${name}` || - `chunks:${chunksKey} key:${cacheGroup.key}`; - // Add module to maps - let info = chunksInfoMap.get(key); - if(info === undefined) { - chunksInfoMap.set(key, info = { - modules: new SortableSet(undefined, sortByIdentifier), - cacheGroup, - name, - chunks: new Map(), - reusedableChunks: new Set(), - chunksKeys: new Set() - }); - } - info.modules.add(module); - if(!info.chunksKeys.has(chunksKey)) { - info.chunksKeys.add(chunksKey); - for(const chunk of selectedChunks) { - info.chunks.set(chunk, chunk.getNumberOfModules()); + // For all (nearly all) combination of chunk selection + for(const selectedChunks of getCombinations(maxSelectedChunks, this.options.maxComplexity)) { + // Get indices of chunks in which this module occurs + const chunkIndices = selectedChunks.map(chunk => indexMap.get(chunk)); + // Break if minimum number of chunks is not reached + if(chunkIndices.length < cacheGroup.minChunks) + continue; + // Determine name for split chunk + const name = cacheGroup.getName(module, selectedChunks, cacheGroup.key); + // Create key for maps + // When it has a name we use the name as key + // Elsewise we create the key from chunks and cache group key + // This automatically merges equal names + const chunksKey = chunkIndices.sort().join(); + const key = name && `name:${name}` || + `chunks:${chunksKey} key:${cacheGroup.key}`; + // Add module to maps + let info = chunksInfoMap.get(key); + if(info === undefined) { + chunksInfoMap.set(key, info = { + modules: new SortableSet(undefined, sortByIdentifier), + cacheGroup, + name, + chunks: new Map(), + reusedableChunks: new Set(), + chunksKeys: new Set() + }); + } + info.modules.add(module); + if(!info.chunksKeys.has(chunksKey)) { + info.chunksKeys.add(chunksKey); + for(const chunk of selectedChunks) { + info.chunks.set(chunk, chunk.getNumberOfModules()); + } } } } } - for(const info of chunksInfoMap.values()) { + for(const [key, info] of chunksInfoMap) { // Get size of module lists info.size = getModulesSize(info.modules); + if(info.size < info.cacheGroup.minSize) { + chunksInfoMap.delete(key); + } } let changed = false; while(chunksInfoMap.size > 0) { @@ -286,10 +316,7 @@ module.exports = class SplitChunksPlugin { } const item = bestEntry; - if(item.size < item.cacheGroup.minSize) { - chunksInfoMap.delete(bestEntryKey); - continue; - } + chunksInfoMap.delete(bestEntryKey); let chunkName = item.name; // Variable for the new chunk (lazy created) @@ -357,21 +384,25 @@ module.exports = class SplitChunksPlugin { } } // remove all modules from other entries and update size - for(const info of chunksInfoMap.values()) { + for(const [key, info] of chunksInfoMap) { if(isOverlap(info.chunks, item.chunks)) { const oldSize = info.modules.size; for(const module of item.modules) { info.modules.delete(module); } + if(info.modules.size === 0) { + chunksInfoMap.delete(key); + continue; + } if(info.modules.size !== oldSize) { info.size = getModulesSize(info.modules); + if(info.size < info.cacheGroup.minSize) + chunksInfoMap.delete(key); } } } changed = true; } - - chunksInfoMap.delete(bestEntryKey); } if(changed) return true; }); diff --git a/schemas/WebpackOptions.json b/schemas/WebpackOptions.json index 93969552e..57383a94e 100644 --- a/schemas/WebpackOptions.json +++ b/schemas/WebpackOptions.json @@ -1335,6 +1335,11 @@ "type": "object", "additionalProperties": false, "properties": { + "maxComplexity": { + "description": "Limits the algorithmic complexity", + "type": "number", + "minimum": 0 + }, "chunks": { "description": "Select chunks for determining shared modules (defaults to \"async\", \"initial\" and \"all\" requires adding these chunks to the HTML)", "enum": [ diff --git a/test/statsCases/async-commons-chunk-auto/expected.txt b/test/statsCases/async-commons-chunk-auto/expected.txt index 68fd07201..058595e80 100644 --- a/test/statsCases/async-commons-chunk-auto/expected.txt +++ b/test/statsCases/async-commons-chunk-auto/expected.txt @@ -62,52 +62,52 @@ Child default: Entrypoint a = default/a.js Entrypoint b = default/b.js Entrypoint c = default/c.js - chunk {0} default/vendors~async-a~async-b~async-c.js (vendors~async-a~async-b~async-c) 20 bytes <{9}> ={8}= ={1}= ={3}= ={7}= ={2}= ={6}= ={5}= >{3}< >{4}< [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b~async-c) + chunk {0} default/vendors~async-a~async-b~async-c.js (vendors~async-a~async-b~async-c) 20 bytes <{9}> ={8}= ={1}= ={2}= ={7}= ={3}= ={6}= ={5}= >{2}< >{4}< [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b~async-c) > ./c [8] ./index.js 3:0-47 > ./b [8] ./index.js 2:0-47 > ./a [8] ./index.js 1:0-47 [1] ./node_modules/x.js 20 bytes {0} {10} {11} {12} [built] - chunk {1} default/async-a~async-b~async-c.js (async-a~async-b~async-c) 20 bytes <{9}> ={0}= ={8}= ={3}= ={7}= ={2}= ={6}= ={5}= >{3}< >{4}< [rendered] split chunk (cache group: default) (name: async-a~async-b~async-c) + chunk {1} default/async-a~async-b~async-c.js (async-a~async-b~async-c) 20 bytes <{9}> ={0}= ={8}= ={2}= ={7}= ={3}= ={6}= ={5}= >{2}< >{4}< [rendered] split chunk (cache group: default) (name: async-a~async-b~async-c) > ./c [8] ./index.js 3:0-47 > ./b [8] ./index.js 2:0-47 > ./a [8] ./index.js 1:0-47 [0] ./d.js 20 bytes {1} {10} {11} {12} [built] - chunk {2} default/vendors~async-a~async-b.js (vendors~async-a~async-b) 20 bytes <{9}> ={0}= ={1}= ={6}= ={5}= >{3}< >{4}< [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b) - > ./b [8] ./index.js 2:0-47 - > ./a [8] ./index.js 1:0-47 - [3] ./node_modules/y.js 20 bytes {2} {10} {11} [built] - chunk {3} default/async-b~async-c~async-g.js (async-b~async-c~async-g) 20 bytes <{0}> <{2}> <{1}> <{5}> <{10}> <{9}> ={4}= ={0}= ={8}= ={1}= ={7}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g) + chunk {2} default/async-b~async-c~async-g.js (async-b~async-c~async-g) 20 bytes <{0}> <{3}> <{1}> <{5}> <{10}> <{9}> ={4}= ={0}= ={8}= ={1}= ={7}= ={3}= ={6}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g) > ./g [] 6:0-47 > ./g [] 6:0-47 > ./c [8] ./index.js 3:0-47 - [2] ./f.js 20 bytes {3} {6} {11} {12} [built] - chunk {4} default/async-g.js (async-g) 34 bytes <{0}> <{2}> <{1}> <{5}> <{10}> ={3}= [rendered] + > ./b [8] ./index.js 2:0-47 + [2] ./f.js 20 bytes {2} {11} {12} [built] + chunk {3} default/vendors~async-a~async-b.js (vendors~async-a~async-b) 20 bytes <{9}> ={0}= ={1}= ={2}= ={6}= ={5}= >{2}< >{4}< [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b) + > ./b [8] ./index.js 2:0-47 + > ./a [8] ./index.js 1:0-47 + [3] ./node_modules/y.js 20 bytes {3} {10} {11} [built] + chunk {4} default/async-g.js (async-g) 34 bytes <{0}> <{3}> <{1}> <{5}> <{10}> ={2}= [rendered] > ./g [] 6:0-47 > ./g [] 6:0-47 [9] ./g.js 34 bytes {4} [built] - chunk {5} default/async-a.js (async-a) 156 bytes <{9}> ={0}= ={2}= ={1}= >{3}< >{4}< [rendered] + chunk {5} default/async-a.js (async-a) 156 bytes <{9}> ={0}= ={3}= ={1}= >{2}< >{4}< [rendered] > ./a [8] ./index.js 1:0-47 [7] ./a.js + 1 modules 156 bytes {5} {10} [built] | ./a.js 121 bytes [built] | ./e.js 20 bytes [built] - chunk {6} default/async-b.js (async-b) 92 bytes <{9}> ={0}= ={2}= ={1}= [rendered] + chunk {6} default/async-b.js (async-b) 72 bytes <{9}> ={0}= ={3}= ={1}= ={2}= [rendered] > ./b [8] ./index.js 2:0-47 - [2] ./f.js 20 bytes {3} {6} {11} {12} [built] [5] ./b.js 72 bytes {6} {11} [built] - chunk {7} default/async-c.js (async-c) 72 bytes <{9}> ={0}= ={8}= ={1}= ={3}= [rendered] + chunk {7} default/async-c.js (async-c) 72 bytes <{9}> ={0}= ={8}= ={1}= ={2}= [rendered] > ./c [8] ./index.js 3:0-47 [6] ./c.js 72 bytes {7} {12} [built] - chunk {8} default/vendors~async-c.js (vendors~async-c) 20 bytes <{9}> ={0}= ={1}= ={3}= ={7}= [rendered] split chunk (cache group: vendors) (name: vendors~async-c) + chunk {8} default/vendors~async-c.js (vendors~async-c) 20 bytes <{9}> ={0}= ={1}= ={2}= ={7}= [rendered] split chunk (cache group: vendors) (name: vendors~async-c) > ./c [8] ./index.js 3:0-47 [4] ./node_modules/z.js 20 bytes {8} {12} [built] - chunk {9} default/main.js (main) 147 bytes >{0}< >{2}< >{1}< >{5}< >{6}< >{8}< >{3}< >{7}< [entry] [rendered] + chunk {9} default/main.js (main) 147 bytes >{0}< >{3}< >{1}< >{2}< >{6}< >{5}< >{8}< >{7}< [entry] [rendered] > ./ main [8] ./index.js 147 bytes {9} [built] - chunk {10} default/a.js (a) 216 bytes >{3}< >{4}< [entry] [rendered] + chunk {10} default/a.js (a) 216 bytes >{2}< >{4}< [entry] [rendered] > ./a a [0] ./d.js 20 bytes {1} {10} {11} {12} [built] [1] ./node_modules/x.js 20 bytes {0} {10} {11} {12} [built] - [3] ./node_modules/y.js 20 bytes {2} {10} {11} [built] + [3] ./node_modules/y.js 20 bytes {3} {10} {11} [built] [7] ./a.js + 1 modules 156 bytes {5} {10} [built] | ./a.js 121 bytes [built] | ./e.js 20 bytes [built] @@ -115,14 +115,14 @@ Child default: > ./b b [0] ./d.js 20 bytes {1} {10} {11} {12} [built] [1] ./node_modules/x.js 20 bytes {0} {10} {11} {12} [built] - [2] ./f.js 20 bytes {3} {6} {11} {12} [built] - [3] ./node_modules/y.js 20 bytes {2} {10} {11} [built] + [2] ./f.js 20 bytes {2} {11} {12} [built] + [3] ./node_modules/y.js 20 bytes {3} {10} {11} [built] [5] ./b.js 72 bytes {6} {11} [built] chunk {12} default/c.js (c) 152 bytes [entry] [rendered] > ./c c [0] ./d.js 20 bytes {1} {10} {11} {12} [built] [1] ./node_modules/x.js 20 bytes {0} {10} {11} {12} [built] - [2] ./f.js 20 bytes {3} {6} {11} {12} [built] + [2] ./f.js 20 bytes {2} {11} {12} [built] [4] ./node_modules/z.js 20 bytes {8} {12} [built] [6] ./c.js 72 bytes {7} {12} [built] Child vendors: @@ -185,10 +185,10 @@ Child vendors: [6] ./c.js 72 bytes {3} {8} [built] Child multiple-vendors: Entrypoint main = multiple-vendors/main.js - Entrypoint a = multiple-vendors/libs-x.js multiple-vendors/a.js - Entrypoint b = multiple-vendors/libs-x.js multiple-vendors/b.js - Entrypoint c = multiple-vendors/libs-x.js multiple-vendors/c.js - chunk {0} multiple-vendors/libs-x.js (libs-x) 20 bytes <{9}> ={12}= ={11}= ={10}= ={7}= ={1}= ={6}= ={2}= ={5}= ={4}= >{8}< >{3}< [initial] [rendered] split chunk (cache group: libs) (name: libs-x) + Entrypoint a = multiple-vendors/libs-x.js multiple-vendors/vendors~a~async-a~async-b~b.js multiple-vendors/a.js + Entrypoint b = multiple-vendors/libs-x.js multiple-vendors/vendors~a~async-a~async-b~b.js multiple-vendors/b.js + Entrypoint c = multiple-vendors/libs-x.js multiple-vendors/vendors~async-c~c.js multiple-vendors/c.js + chunk {0} multiple-vendors/libs-x.js (libs-x) 20 bytes <{9}> ={4}= ={12}= ={3}= ={11}= ={10}= ={1}= ={2}= ={7}= ={6}= ={8}= >{2}< >{5}< [initial] [rendered] split chunk (cache group: libs) (name: libs-x) > ./c c > ./b b > ./a a @@ -196,126 +196,126 @@ Child multiple-vendors: > ./b [8] ./index.js 2:0-47 > ./a [8] ./index.js 1:0-47 [2] ./node_modules/x.js 20 bytes {0} [built] - chunk {1} multiple-vendors/a~async-a~async-b~async-c~b~c.js (a~async-a~async-b~async-c~b~c) 20 bytes <{9}> ={0}= ={7}= ={6}= ={2}= ={5}= ={4}= >{8}< >{3}< [rendered] split chunk (cache group: default) (name: a~async-a~async-b~async-c~b~c) - > ./c [8] ./index.js 3:0-47 - > ./b [8] ./index.js 2:0-47 - > ./a [8] ./index.js 1:0-47 - [1] ./d.js 20 bytes {1} {10} {11} {12} [built] - chunk {2} multiple-vendors/vendors~a~async-a~async-b~b.js (vendors~a~async-a~async-b~b) 20 bytes <{9}> ={0}= ={1}= ={5}= ={4}= >{8}< >{3}< [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~b) - > ./b [8] ./index.js 2:0-47 - > ./a [8] ./index.js 1:0-47 - [3] ./node_modules/y.js 20 bytes {2} {10} {11} [built] - chunk {3} multiple-vendors/async-g.js (async-g) 34 bytes <{0}> <{10}> <{2}> <{1}> <{4}> ={8}= [rendered] - > ./g [] 6:0-47 - > ./g [] 6:0-47 - [9] ./g.js 34 bytes {3} [built] - chunk {4} multiple-vendors/async-a.js (async-a) 156 bytes <{9}> ={0}= ={2}= ={1}= >{8}< >{3}< [rendered] - > ./a [8] ./index.js 1:0-47 - [7] ./a.js + 1 modules 156 bytes {4} {10} [built] - | ./a.js 121 bytes [built] - | ./e.js 20 bytes [built] - chunk {5} multiple-vendors/async-b.js (async-b) 92 bytes <{9}> ={0}= ={2}= ={1}= [rendered] - > ./b [8] ./index.js 2:0-47 - [0] ./f.js 20 bytes {5} {6} {8} {11} {12} [built] - [5] ./b.js 72 bytes {5} {11} [built] - chunk {6} multiple-vendors/async-c.js (async-c) 92 bytes <{9}> ={0}= ={7}= ={1}= [rendered] - > ./c [8] ./index.js 3:0-47 - [0] ./f.js 20 bytes {5} {6} {8} {11} {12} [built] - [6] ./c.js 72 bytes {6} {12} [built] - chunk {7} multiple-vendors/vendors~async-c~c.js (vendors~async-c~c) 20 bytes <{9}> ={0}= ={1}= ={6}= [rendered] split chunk (cache group: vendors) (name: vendors~async-c~c) - > ./c [8] ./index.js 3:0-47 - [4] ./node_modules/z.js 20 bytes {7} {12} [built] - chunk {8} multiple-vendors/async-b~async-c~async-g~b~c.js (async-b~async-c~async-g~b~c) 20 bytes <{0}> <{10}> <{2}> <{1}> <{4}> ={3}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g~b~c) - > ./g [] 6:0-47 - > ./g [] 6:0-47 - [0] ./f.js 20 bytes {5} {6} {8} {11} {12} [built] - chunk {9} multiple-vendors/main.js (main) 147 bytes >{0}< >{2}< >{1}< >{4}< >{5}< >{7}< >{6}< [entry] [rendered] - > ./ main - [8] ./index.js 147 bytes {9} [built] - chunk {10} multiple-vendors/a.js (a) 196 bytes ={0}= >{8}< >{3}< [entry] [rendered] - > ./a a - [1] ./d.js 20 bytes {1} {10} {11} {12} [built] - [3] ./node_modules/y.js 20 bytes {2} {10} {11} [built] - [7] ./a.js + 1 modules 156 bytes {4} {10} [built] - | ./a.js 121 bytes [built] - | ./e.js 20 bytes [built] - chunk {11} multiple-vendors/b.js (b) 132 bytes ={0}= [entry] [rendered] - > ./b b - [0] ./f.js 20 bytes {5} {6} {8} {11} {12} [built] - [1] ./d.js 20 bytes {1} {10} {11} {12} [built] - [3] ./node_modules/y.js 20 bytes {2} {10} {11} [built] - [5] ./b.js 72 bytes {5} {11} [built] - chunk {12} multiple-vendors/c.js (c) 132 bytes ={0}= [entry] [rendered] - > ./c c - [0] ./f.js 20 bytes {5} {6} {8} {11} {12} [built] - [1] ./d.js 20 bytes {1} {10} {11} {12} [built] - [4] ./node_modules/z.js 20 bytes {7} {12} [built] - [6] ./c.js 72 bytes {6} {12} [built] -Child all: - Entrypoint main = all/main.js - Entrypoint a = all/vendors~a~async-a~async-b~async-c~b~c.js all/a~async-a~async-b~b.js all/a.js - Entrypoint b = all/vendors~a~async-a~async-b~async-c~b~c.js all/a~async-a~async-b~b.js all/b.js - Entrypoint c = all/vendors~a~async-a~async-b~async-c~b~c.js all/vendors~async-c~c.js all/c.js - chunk {0} all/vendors~a~async-a~async-b~async-c~b~c.js (vendors~a~async-a~async-b~async-c~b~c) 20 bytes <{9}> ={4}= ={12}= ={3}= ={11}= ={10}= ={1}= ={2}= ={8}= ={7}= ={6}= >{2}< >{5}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~async-c~b~c) - > ./c c - > ./b b - > ./a a - > ./c [8] ./index.js 3:0-47 - > ./b [8] ./index.js 2:0-47 - > ./a [8] ./index.js 1:0-47 - [2] ./node_modules/x.js 20 bytes {0} [built] - chunk {1} all/a~async-a~async-b~async-c~b~c.js (a~async-a~async-b~async-c~b~c) 20 bytes <{9}> ={0}= ={4}= ={2}= ={8}= ={3}= ={7}= ={6}= >{2}< >{5}< [rendered] split chunk (cache group: default) (name: a~async-a~async-b~async-c~b~c) + chunk {1} multiple-vendors/a~async-a~async-b~async-c~b~c.js (a~async-a~async-b~async-c~b~c) 20 bytes <{9}> ={0}= ={4}= ={2}= ={7}= ={3}= ={6}= ={8}= >{2}< >{5}< [rendered] split chunk (cache group: default) (name: a~async-a~async-b~async-c~b~c) > ./c [8] ./index.js 3:0-47 > ./b [8] ./index.js 2:0-47 > ./a [8] ./index.js 1:0-47 [0] ./d.js 20 bytes {1} {10} {11} {12} [built] - chunk {2} all/async-b~async-c~async-g~b~c.js (async-b~async-c~async-g~b~c) 20 bytes <{0}> <{3}> <{1}> <{6}> <{10}> <{9}> ={5}= ={0}= ={4}= ={1}= ={8}= ={3}= ={7}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g~b~c) + chunk {2} multiple-vendors/async-b~async-c~async-g~b~c.js (async-b~async-c~async-g~b~c) 20 bytes <{0}> <{3}> <{1}> <{8}> <{10}> <{9}> ={5}= ={0}= ={4}= ={1}= ={7}= ={3}= ={6}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g~b~c) > ./g [] 6:0-47 > ./g [] 6:0-47 > ./c [8] ./index.js 3:0-47 > ./b [8] ./index.js 2:0-47 [1] ./f.js 20 bytes {2} {11} {12} [built] - chunk {3} all/a~async-a~async-b~b.js (a~async-a~async-b~b) 20 bytes <{9}> ={0}= ={11}= ={10}= ={1}= ={2}= ={7}= ={6}= >{2}< >{5}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~b) + chunk {3} multiple-vendors/vendors~a~async-a~async-b~b.js (vendors~a~async-a~async-b~b) 20 bytes <{9}> ={0}= ={11}= ={10}= ={1}= ={2}= ={6}= ={8}= >{2}< >{5}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~b) > ./b b > ./a a > ./b [8] ./index.js 2:0-47 > ./a [8] ./index.js 1:0-47 [3] ./node_modules/y.js 20 bytes {3} [built] - chunk {4} all/vendors~async-c~c.js (vendors~async-c~c) 20 bytes <{9}> ={0}= ={12}= ={1}= ={2}= ={8}= [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-c~c) + chunk {4} multiple-vendors/vendors~async-c~c.js (vendors~async-c~c) 20 bytes <{9}> ={0}= ={12}= ={1}= ={2}= ={7}= [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-c~c) > ./c c > ./c [8] ./index.js 3:0-47 [7] ./node_modules/z.js 20 bytes {4} [built] - chunk {5} all/async-g.js (async-g) 34 bytes <{0}> <{3}> <{1}> <{6}> <{10}> ={2}= [rendered] + chunk {5} multiple-vendors/async-g.js (async-g) 34 bytes <{0}> <{3}> <{1}> <{8}> <{10}> ={2}= [rendered] > ./g [] 6:0-47 > ./g [] 6:0-47 [9] ./g.js 34 bytes {5} [built] - chunk {6} all/async-a.js (async-a) 156 bytes <{9}> ={0}= ={3}= ={1}= >{2}< >{5}< [rendered] + chunk {6} multiple-vendors/async-b.js (async-b) 72 bytes <{9}> ={0}= ={3}= ={1}= ={2}= [rendered] + > ./b [8] ./index.js 2:0-47 + [4] ./b.js 72 bytes {6} {11} [built] + chunk {7} multiple-vendors/async-c.js (async-c) 72 bytes <{9}> ={0}= ={4}= ={1}= ={2}= [rendered] + > ./c [8] ./index.js 3:0-47 + [5] ./c.js 72 bytes {7} {12} [built] + chunk {8} multiple-vendors/a~async-a.js (a~async-a) 156 bytes <{9}> ={0}= ={3}= ={1}= >{2}< >{5}< [rendered] split chunk (cache group: default) (name: a~async-a) > ./a [8] ./index.js 1:0-47 - [6] ./a.js + 1 modules 156 bytes {6} {10} [built] + [6] ./a.js + 1 modules 156 bytes {8} {10} [built] | ./a.js 121 bytes [built] | ./e.js 20 bytes [built] - chunk {7} all/async-b.js (async-b) 72 bytes <{9}> ={0}= ={3}= ={1}= ={2}= [rendered] - > ./b [8] ./index.js 2:0-47 - [4] ./b.js 72 bytes {7} {11} [built] - chunk {8} all/async-c.js (async-c) 72 bytes <{9}> ={0}= ={4}= ={1}= ={2}= [rendered] + chunk {9} multiple-vendors/main.js (main) 147 bytes >{0}< >{3}< >{1}< >{2}< >{6}< >{8}< >{4}< >{7}< [entry] [rendered] + > ./ main + [8] ./index.js 147 bytes {9} [built] + chunk {10} multiple-vendors/a.js (a) 176 bytes ={0}= ={3}= >{2}< >{5}< [entry] [rendered] + > ./a a + [0] ./d.js 20 bytes {1} {10} {11} {12} [built] + [6] ./a.js + 1 modules 156 bytes {8} {10} [built] + | ./a.js 121 bytes [built] + | ./e.js 20 bytes [built] + chunk {11} multiple-vendors/b.js (b) 112 bytes ={0}= ={3}= [entry] [rendered] + > ./b b + [0] ./d.js 20 bytes {1} {10} {11} {12} [built] + [1] ./f.js 20 bytes {2} {11} {12} [built] + [4] ./b.js 72 bytes {6} {11} [built] + chunk {12} multiple-vendors/c.js (c) 112 bytes ={0}= ={4}= [entry] [rendered] + > ./c c + [0] ./d.js 20 bytes {1} {10} {11} {12} [built] + [1] ./f.js 20 bytes {2} {11} {12} [built] + [5] ./c.js 72 bytes {7} {12} [built] +Child all: + Entrypoint main = all/main.js + Entrypoint a = all/vendors~a~async-a~async-b~async-c~b~c.js all/vendors~a~async-a~async-b~b.js all/a.js + Entrypoint b = all/vendors~a~async-a~async-b~async-c~b~c.js all/vendors~a~async-a~async-b~b.js all/b.js + Entrypoint c = all/vendors~a~async-a~async-b~async-c~b~c.js all/vendors~async-c~c.js all/c.js + chunk {0} all/vendors~a~async-a~async-b~async-c~b~c.js (vendors~a~async-a~async-b~async-c~b~c) 20 bytes <{9}> ={4}= ={12}= ={3}= ={11}= ={10}= ={1}= ={2}= ={7}= ={6}= ={8}= >{2}< >{5}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~async-c~b~c) + > ./c c + > ./b b + > ./a a > ./c [8] ./index.js 3:0-47 - [5] ./c.js 72 bytes {8} {12} [built] - chunk {9} all/main.js (main) 147 bytes >{0}< >{3}< >{1}< >{2}< >{7}< >{6}< >{4}< >{8}< [entry] [rendered] + > ./b [8] ./index.js 2:0-47 + > ./a [8] ./index.js 1:0-47 + [2] ./node_modules/x.js 20 bytes {0} [built] + chunk {1} all/a~async-a~async-b~async-c~b~c.js (a~async-a~async-b~async-c~b~c) 20 bytes <{9}> ={0}= ={4}= ={2}= ={7}= ={3}= ={6}= ={8}= >{2}< >{5}< [rendered] split chunk (cache group: default) (name: a~async-a~async-b~async-c~b~c) + > ./c [8] ./index.js 3:0-47 + > ./b [8] ./index.js 2:0-47 + > ./a [8] ./index.js 1:0-47 + [0] ./d.js 20 bytes {1} {10} {11} {12} [built] + chunk {2} all/async-b~async-c~async-g~b~c.js (async-b~async-c~async-g~b~c) 20 bytes <{0}> <{3}> <{1}> <{8}> <{10}> <{9}> ={5}= ={0}= ={4}= ={1}= ={7}= ={3}= ={6}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g~b~c) + > ./g [] 6:0-47 + > ./g [] 6:0-47 + > ./c [8] ./index.js 3:0-47 + > ./b [8] ./index.js 2:0-47 + [1] ./f.js 20 bytes {2} {11} {12} [built] + chunk {3} all/vendors~a~async-a~async-b~b.js (vendors~a~async-a~async-b~b) 20 bytes <{9}> ={0}= ={11}= ={10}= ={1}= ={2}= ={6}= ={8}= >{2}< >{5}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~b) + > ./b b + > ./a a + > ./b [8] ./index.js 2:0-47 + > ./a [8] ./index.js 1:0-47 + [3] ./node_modules/y.js 20 bytes {3} [built] + chunk {4} all/vendors~async-c~c.js (vendors~async-c~c) 20 bytes <{9}> ={0}= ={12}= ={1}= ={2}= ={7}= [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-c~c) + > ./c c + > ./c [8] ./index.js 3:0-47 + [7] ./node_modules/z.js 20 bytes {4} [built] + chunk {5} all/async-g.js (async-g) 34 bytes <{0}> <{3}> <{1}> <{8}> <{10}> ={2}= [rendered] + > ./g [] 6:0-47 + > ./g [] 6:0-47 + [9] ./g.js 34 bytes {5} [built] + chunk {6} all/async-b.js (async-b) 72 bytes <{9}> ={0}= ={3}= ={1}= ={2}= [rendered] + > ./b [8] ./index.js 2:0-47 + [4] ./b.js 72 bytes {6} {11} [built] + chunk {7} all/async-c.js (async-c) 72 bytes <{9}> ={0}= ={4}= ={1}= ={2}= [rendered] + > ./c [8] ./index.js 3:0-47 + [5] ./c.js 72 bytes {7} {12} [built] + chunk {8} all/a~async-a.js (a~async-a) 156 bytes <{9}> ={0}= ={3}= ={1}= >{2}< >{5}< [rendered] split chunk (cache group: default) (name: a~async-a) + > ./a [8] ./index.js 1:0-47 + [6] ./a.js + 1 modules 156 bytes {8} {10} [built] + | ./a.js 121 bytes [built] + | ./e.js 20 bytes [built] + chunk {9} all/main.js (main) 147 bytes >{0}< >{3}< >{1}< >{2}< >{6}< >{8}< >{4}< >{7}< [entry] [rendered] > ./ main [8] ./index.js 147 bytes {9} [built] chunk {10} all/a.js (a) 176 bytes ={0}= ={3}= >{2}< >{5}< [entry] [rendered] > ./a a [0] ./d.js 20 bytes {1} {10} {11} {12} [built] - [6] ./a.js + 1 modules 156 bytes {6} {10} [built] + [6] ./a.js + 1 modules 156 bytes {8} {10} [built] | ./a.js 121 bytes [built] | ./e.js 20 bytes [built] chunk {11} all/b.js (b) 112 bytes ={0}= ={3}= [entry] [rendered] > ./b b [0] ./d.js 20 bytes {1} {10} {11} {12} [built] [1] ./f.js 20 bytes {2} {11} {12} [built] - [4] ./b.js 72 bytes {7} {11} [built] + [4] ./b.js 72 bytes {6} {11} [built] chunk {12} all/c.js (c) 112 bytes ={0}= ={4}= [entry] [rendered] > ./c c [0] ./d.js 20 bytes {1} {10} {11} {12} [built] [1] ./f.js 20 bytes {2} {11} {12} [built] - [5] ./c.js 72 bytes {8} {12} [built] \ No newline at end of file + [5] ./c.js 72 bytes {7} {12} [built] \ No newline at end of file diff --git a/test/statsCases/split-chunks-combinations/a.js b/test/statsCases/split-chunks-combinations/a.js new file mode 100644 index 000000000..1ffdae326 --- /dev/null +++ b/test/statsCases/split-chunks-combinations/a.js @@ -0,0 +1,3 @@ +import "./d"; +import "./e"; +export default "a"; diff --git a/test/statsCases/split-chunks-combinations/b.js b/test/statsCases/split-chunks-combinations/b.js new file mode 100644 index 000000000..aa63bb2f0 --- /dev/null +++ b/test/statsCases/split-chunks-combinations/b.js @@ -0,0 +1,3 @@ +import "./d"; +import "./e"; +export default "b"; diff --git a/test/statsCases/split-chunks-combinations/c.js b/test/statsCases/split-chunks-combinations/c.js new file mode 100644 index 000000000..a88137b62 --- /dev/null +++ b/test/statsCases/split-chunks-combinations/c.js @@ -0,0 +1,2 @@ +import "./d"; +export default "a"; diff --git a/test/statsCases/split-chunks-combinations/d.js b/test/statsCases/split-chunks-combinations/d.js new file mode 100644 index 000000000..1f44b439e --- /dev/null +++ b/test/statsCases/split-chunks-combinations/d.js @@ -0,0 +1 @@ +// content content content content content content content content diff --git a/test/statsCases/split-chunks-combinations/e.js b/test/statsCases/split-chunks-combinations/e.js new file mode 100644 index 000000000..1f44b439e --- /dev/null +++ b/test/statsCases/split-chunks-combinations/e.js @@ -0,0 +1 @@ +// content content content content content content content content diff --git a/test/statsCases/split-chunks-combinations/expected.txt b/test/statsCases/split-chunks-combinations/expected.txt new file mode 100644 index 000000000..74806a51b --- /dev/null +++ b/test/statsCases/split-chunks-combinations/expected.txt @@ -0,0 +1,19 @@ +Entrypoint main = main.js +chunk {0} async-a~async-b.js (async-a~async-b) 134 bytes <{4}> ={2}= ={1}= [rendered] split chunk (cache group: default) (name: async-a~async-b) + > ./b [5] ./index.js 2:0-47 + > ./a [5] ./index.js 1:0-47 + [0] ./d.js 67 bytes {0} {3} [built] + [1] ./e.js 67 bytes {0} [built] +chunk {1} async-a.js (async-a) 48 bytes <{4}> ={0}= [rendered] + > ./a [5] ./index.js 1:0-47 + [2] ./a.js 48 bytes {1} [built] +chunk {2} async-b.js (async-b) 48 bytes <{4}> ={0}= [rendered] + > ./b [5] ./index.js 2:0-47 + [3] ./b.js 48 bytes {2} [built] +chunk {3} async-c.js (async-c) 101 bytes <{4}> [rendered] + > ./c [5] ./index.js 3:0-47 + [0] ./d.js 67 bytes {0} {3} [built] + [4] ./c.js 34 bytes {3} [built] +chunk {4} main.js (main) 147 bytes >{0}< >{1}< >{2}< >{3}< [entry] [rendered] + > ./ main + [5] ./index.js 147 bytes {4} [built] \ No newline at end of file diff --git a/test/statsCases/split-chunks-combinations/f.js b/test/statsCases/split-chunks-combinations/f.js new file mode 100644 index 000000000..531ff10e5 --- /dev/null +++ b/test/statsCases/split-chunks-combinations/f.js @@ -0,0 +1 @@ +// content content content content content diff --git a/test/statsCases/split-chunks-combinations/index.js b/test/statsCases/split-chunks-combinations/index.js new file mode 100644 index 000000000..5dfec91bc --- /dev/null +++ b/test/statsCases/split-chunks-combinations/index.js @@ -0,0 +1,3 @@ +import(/* webpackChunkName: "async-a" */ "./a"); +import(/* webpackChunkName: "async-b" */ "./b"); +import(/* webpackChunkName: "async-c" */ "./c"); diff --git a/test/statsCases/split-chunks-combinations/webpack.config.js b/test/statsCases/split-chunks-combinations/webpack.config.js new file mode 100644 index 000000000..536c5f125 --- /dev/null +++ b/test/statsCases/split-chunks-combinations/webpack.config.js @@ -0,0 +1,25 @@ +const stats = { + hash: false, + timings: false, + builtAt: false, + assets: false, + chunks: true, + chunkOrigins: true, + entrypoints: true, + modules: false +}; +module.exports = { + mode: "production", + entry: { + main: "./" + }, + output: { + filename: "[name].js" + }, + optimization: { + splitChunks: { + minSize: 100 + } + }, + stats +}; diff --git a/test/statsCases/split-chunks-prefer-bigger-splits/a.js b/test/statsCases/split-chunks-prefer-bigger-splits/a.js new file mode 100644 index 000000000..1ffdae326 --- /dev/null +++ b/test/statsCases/split-chunks-prefer-bigger-splits/a.js @@ -0,0 +1,3 @@ +import "./d"; +import "./e"; +export default "a"; diff --git a/test/statsCases/split-chunks-prefer-bigger-splits/b.js b/test/statsCases/split-chunks-prefer-bigger-splits/b.js new file mode 100644 index 000000000..516c72ceb --- /dev/null +++ b/test/statsCases/split-chunks-prefer-bigger-splits/b.js @@ -0,0 +1,4 @@ +import "./d"; +import "./e"; +import "./f"; +export default "b"; diff --git a/test/statsCases/split-chunks-prefer-bigger-splits/c.js b/test/statsCases/split-chunks-prefer-bigger-splits/c.js new file mode 100644 index 000000000..82d094916 --- /dev/null +++ b/test/statsCases/split-chunks-prefer-bigger-splits/c.js @@ -0,0 +1,3 @@ +import "./d"; +import "./f"; +export default "a"; diff --git a/test/statsCases/split-chunks-prefer-bigger-splits/d.js b/test/statsCases/split-chunks-prefer-bigger-splits/d.js new file mode 100644 index 000000000..531ff10e5 --- /dev/null +++ b/test/statsCases/split-chunks-prefer-bigger-splits/d.js @@ -0,0 +1 @@ +// content content content content content diff --git a/test/statsCases/split-chunks-prefer-bigger-splits/e.js b/test/statsCases/split-chunks-prefer-bigger-splits/e.js new file mode 100644 index 000000000..531ff10e5 --- /dev/null +++ b/test/statsCases/split-chunks-prefer-bigger-splits/e.js @@ -0,0 +1 @@ +// content content content content content diff --git a/test/statsCases/split-chunks-prefer-bigger-splits/expected.txt b/test/statsCases/split-chunks-prefer-bigger-splits/expected.txt new file mode 100644 index 000000000..e2fc34cbf --- /dev/null +++ b/test/statsCases/split-chunks-prefer-bigger-splits/expected.txt @@ -0,0 +1,21 @@ +Entrypoint main = default/main.js +chunk {0} default/async-b~async-c.js (async-b~async-c) 110 bytes <{4}> ={3}= ={2}= [rendered] split chunk (cache group: default) (name: async-b~async-c) + > ./c [6] ./index.js 3:0-47 + > ./b [6] ./index.js 2:0-47 + [0] ./d.js 43 bytes {0} {1} [built] + [2] ./f.js 67 bytes {0} [built] +chunk {1} default/async-a.js (async-a) 134 bytes <{4}> [rendered] + > ./a [6] ./index.js 1:0-47 + [0] ./d.js 43 bytes {0} {1} [built] + [1] ./e.js 43 bytes {1} {2} [built] + [3] ./a.js 48 bytes {1} [built] +chunk {2} default/async-b.js (async-b) 105 bytes <{4}> ={0}= [rendered] + > ./b [6] ./index.js 2:0-47 + [1] ./e.js 43 bytes {1} {2} [built] + [4] ./b.js 62 bytes {2} [built] +chunk {3} default/async-c.js (async-c) 48 bytes <{4}> ={0}= [rendered] + > ./c [6] ./index.js 3:0-47 + [5] ./c.js 48 bytes {3} [built] +chunk {4} default/main.js (main) 147 bytes >{0}< >{2}< >{3}< >{1}< [entry] [rendered] + > ./ main + [6] ./index.js 147 bytes {4} [built] \ No newline at end of file diff --git a/test/statsCases/split-chunks-prefer-bigger-splits/f.js b/test/statsCases/split-chunks-prefer-bigger-splits/f.js new file mode 100644 index 000000000..1f44b439e --- /dev/null +++ b/test/statsCases/split-chunks-prefer-bigger-splits/f.js @@ -0,0 +1 @@ +// content content content content content content content content diff --git a/test/statsCases/split-chunks-prefer-bigger-splits/index.js b/test/statsCases/split-chunks-prefer-bigger-splits/index.js new file mode 100644 index 000000000..5dfec91bc --- /dev/null +++ b/test/statsCases/split-chunks-prefer-bigger-splits/index.js @@ -0,0 +1,3 @@ +import(/* webpackChunkName: "async-a" */ "./a"); +import(/* webpackChunkName: "async-b" */ "./b"); +import(/* webpackChunkName: "async-c" */ "./c"); diff --git a/test/statsCases/split-chunks-prefer-bigger-splits/webpack.config.js b/test/statsCases/split-chunks-prefer-bigger-splits/webpack.config.js new file mode 100644 index 000000000..bbf3daaf4 --- /dev/null +++ b/test/statsCases/split-chunks-prefer-bigger-splits/webpack.config.js @@ -0,0 +1,25 @@ +const stats = { + hash: false, + timings: false, + builtAt: false, + assets: false, + chunks: true, + chunkOrigins: true, + entrypoints: true, + modules: false +}; +module.exports = { + mode: "production", + entry: { + main: "./", + }, + output: { + filename: "default/[name].js" + }, + optimization: { + splitChunks: { + minSize: 80 + } + }, + stats +}; diff --git a/test/statsCases/split-chunks/expected.txt b/test/statsCases/split-chunks/expected.txt index 80b01318d..440b1ac7b 100644 --- a/test/statsCases/split-chunks/expected.txt +++ b/test/statsCases/split-chunks/expected.txt @@ -3,52 +3,52 @@ Child default: Entrypoint a = default/a.js Entrypoint b = default/b.js Entrypoint c = default/c.js - chunk {0} default/vendors~async-a~async-b~async-c.js (vendors~async-a~async-b~async-c) 20 bytes <{9}> ={8}= ={1}= ={3}= ={7}= ={2}= ={6}= ={5}= >{3}< >{4}< [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b~async-c) + chunk {0} default/vendors~async-a~async-b~async-c.js (vendors~async-a~async-b~async-c) 20 bytes <{9}> ={8}= ={1}= ={2}= ={7}= ={3}= ={6}= ={5}= >{2}< >{4}< [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b~async-c) > ./c [8] ./index.js 3:0-47 > ./b [8] ./index.js 2:0-47 > ./a [8] ./index.js 1:0-47 [1] ./node_modules/x.js 20 bytes {0} {10} {11} {12} [built] - chunk {1} default/async-a~async-b~async-c.js (async-a~async-b~async-c) 20 bytes <{9}> ={0}= ={8}= ={3}= ={7}= ={2}= ={6}= ={5}= >{3}< >{4}< [rendered] split chunk (cache group: default) (name: async-a~async-b~async-c) + chunk {1} default/async-a~async-b~async-c.js (async-a~async-b~async-c) 20 bytes <{9}> ={0}= ={8}= ={2}= ={7}= ={3}= ={6}= ={5}= >{2}< >{4}< [rendered] split chunk (cache group: default) (name: async-a~async-b~async-c) > ./c [8] ./index.js 3:0-47 > ./b [8] ./index.js 2:0-47 > ./a [8] ./index.js 1:0-47 [0] ./d.js 20 bytes {1} {10} {11} {12} [built] - chunk {2} default/vendors~async-a~async-b.js (vendors~async-a~async-b) 20 bytes <{9}> ={0}= ={1}= ={6}= ={5}= >{3}< >{4}< [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b) - > ./b [8] ./index.js 2:0-47 - > ./a [8] ./index.js 1:0-47 - [3] ./node_modules/y.js 20 bytes {2} {10} {11} [built] - chunk {3} default/async-b~async-c~async-g.js (async-b~async-c~async-g) 20 bytes <{0}> <{2}> <{1}> <{5}> <{10}> <{9}> ={4}= ={0}= ={8}= ={1}= ={7}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g) + chunk {2} default/async-b~async-c~async-g.js (async-b~async-c~async-g) 20 bytes <{0}> <{3}> <{1}> <{5}> <{10}> <{9}> ={4}= ={0}= ={8}= ={1}= ={7}= ={3}= ={6}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g) > ./g [] 6:0-47 > ./g [] 6:0-47 > ./c [8] ./index.js 3:0-47 - [2] ./f.js 20 bytes {3} {6} {11} {12} [built] - chunk {4} default/async-g.js (async-g) 34 bytes <{0}> <{2}> <{1}> <{5}> <{10}> ={3}= [rendered] + > ./b [8] ./index.js 2:0-47 + [2] ./f.js 20 bytes {2} {11} {12} [built] + chunk {3} default/vendors~async-a~async-b.js (vendors~async-a~async-b) 20 bytes <{9}> ={0}= ={1}= ={2}= ={6}= ={5}= >{2}< >{4}< [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b) + > ./b [8] ./index.js 2:0-47 + > ./a [8] ./index.js 1:0-47 + [3] ./node_modules/y.js 20 bytes {3} {10} {11} [built] + chunk {4} default/async-g.js (async-g) 34 bytes <{0}> <{3}> <{1}> <{5}> <{10}> ={2}= [rendered] > ./g [] 6:0-47 > ./g [] 6:0-47 [9] ./g.js 34 bytes {4} [built] - chunk {5} default/async-a.js (async-a) 156 bytes <{9}> ={0}= ={2}= ={1}= >{3}< >{4}< [rendered] + chunk {5} default/async-a.js (async-a) 156 bytes <{9}> ={0}= ={3}= ={1}= >{2}< >{4}< [rendered] > ./a [8] ./index.js 1:0-47 [7] ./a.js + 1 modules 156 bytes {5} {10} [built] | ./a.js 121 bytes [built] | ./e.js 20 bytes [built] - chunk {6} default/async-b.js (async-b) 92 bytes <{9}> ={0}= ={2}= ={1}= [rendered] + chunk {6} default/async-b.js (async-b) 72 bytes <{9}> ={0}= ={3}= ={1}= ={2}= [rendered] > ./b [8] ./index.js 2:0-47 - [2] ./f.js 20 bytes {3} {6} {11} {12} [built] [5] ./b.js 72 bytes {6} {11} [built] - chunk {7} default/async-c.js (async-c) 72 bytes <{9}> ={0}= ={8}= ={1}= ={3}= [rendered] + chunk {7} default/async-c.js (async-c) 72 bytes <{9}> ={0}= ={8}= ={1}= ={2}= [rendered] > ./c [8] ./index.js 3:0-47 [6] ./c.js 72 bytes {7} {12} [built] - chunk {8} default/vendors~async-c.js (vendors~async-c) 20 bytes <{9}> ={0}= ={1}= ={3}= ={7}= [rendered] split chunk (cache group: vendors) (name: vendors~async-c) + chunk {8} default/vendors~async-c.js (vendors~async-c) 20 bytes <{9}> ={0}= ={1}= ={2}= ={7}= [rendered] split chunk (cache group: vendors) (name: vendors~async-c) > ./c [8] ./index.js 3:0-47 [4] ./node_modules/z.js 20 bytes {8} {12} [built] - chunk {9} default/main.js (main) 147 bytes >{0}< >{2}< >{1}< >{5}< >{6}< >{8}< >{3}< >{7}< [entry] [rendered] + chunk {9} default/main.js (main) 147 bytes >{0}< >{3}< >{1}< >{2}< >{6}< >{5}< >{8}< >{7}< [entry] [rendered] > ./ main [8] ./index.js 147 bytes {9} [built] - chunk {10} default/a.js (a) 216 bytes >{3}< >{4}< [entry] [rendered] + chunk {10} default/a.js (a) 216 bytes >{2}< >{4}< [entry] [rendered] > ./a a [0] ./d.js 20 bytes {1} {10} {11} {12} [built] [1] ./node_modules/x.js 20 bytes {0} {10} {11} {12} [built] - [3] ./node_modules/y.js 20 bytes {2} {10} {11} [built] + [3] ./node_modules/y.js 20 bytes {3} {10} {11} [built] [7] ./a.js + 1 modules 156 bytes {5} {10} [built] | ./a.js 121 bytes [built] | ./e.js 20 bytes [built] @@ -56,14 +56,14 @@ Child default: > ./b b [0] ./d.js 20 bytes {1} {10} {11} {12} [built] [1] ./node_modules/x.js 20 bytes {0} {10} {11} {12} [built] - [2] ./f.js 20 bytes {3} {6} {11} {12} [built] - [3] ./node_modules/y.js 20 bytes {2} {10} {11} [built] + [2] ./f.js 20 bytes {2} {11} {12} [built] + [3] ./node_modules/y.js 20 bytes {3} {10} {11} [built] [5] ./b.js 72 bytes {6} {11} [built] chunk {12} default/c.js (c) 152 bytes [entry] [rendered] > ./c c [0] ./d.js 20 bytes {1} {10} {11} {12} [built] [1] ./node_modules/x.js 20 bytes {0} {10} {11} {12} [built] - [2] ./f.js 20 bytes {3} {6} {11} {12} [built] + [2] ./f.js 20 bytes {2} {11} {12} [built] [4] ./node_modules/z.js 20 bytes {8} {12} [built] [6] ./c.js 72 bytes {7} {12} [built] Child all-chunks: @@ -71,7 +71,7 @@ Child all-chunks: Entrypoint a = default/vendors~a~async-a~async-b~async-c~b~c.js default/vendors~a~async-a~async-b~b.js default/a.js Entrypoint b = default/vendors~a~async-a~async-b~async-c~b~c.js default/vendors~a~async-a~async-b~b.js default/b.js Entrypoint c = default/vendors~a~async-a~async-b~async-c~b~c.js default/vendors~async-c~c.js default/c.js - chunk {0} default/vendors~a~async-a~async-b~async-c~b~c.js (vendors~a~async-a~async-b~async-c~b~c) 20 bytes <{9}> ={4}= ={12}= ={2}= ={11}= ={10}= ={1}= ={3}= ={8}= ={7}= ={6}= >{3}< >{5}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~async-c~b~c) + chunk {0} default/vendors~a~async-a~async-b~async-c~b~c.js (vendors~a~async-a~async-b~async-c~b~c) 20 bytes <{9}> ={4}= ={12}= ={3}= ={11}= ={10}= ={1}= ={2}= ={7}= ={6}= ={8}= >{2}< >{5}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~async-c~b~c) > ./c c > ./b b > ./a a @@ -79,61 +79,61 @@ Child all-chunks: > ./b [8] ./index.js 2:0-47 > ./a [8] ./index.js 1:0-47 [2] ./node_modules/x.js 20 bytes {0} [built] - chunk {1} default/a~async-a~async-b~async-c~b~c.js (a~async-a~async-b~async-c~b~c) 20 bytes <{9}> ={0}= ={4}= ={3}= ={8}= ={2}= ={7}= ={6}= >{3}< >{5}< [rendered] split chunk (cache group: default) (name: a~async-a~async-b~async-c~b~c) + chunk {1} default/a~async-a~async-b~async-c~b~c.js (a~async-a~async-b~async-c~b~c) 20 bytes <{9}> ={0}= ={4}= ={2}= ={7}= ={3}= ={6}= ={8}= >{2}< >{5}< [rendered] split chunk (cache group: default) (name: a~async-a~async-b~async-c~b~c) > ./c [8] ./index.js 3:0-47 > ./b [8] ./index.js 2:0-47 > ./a [8] ./index.js 1:0-47 [0] ./d.js 20 bytes {1} {10} {11} {12} [built] - chunk {2} default/vendors~a~async-a~async-b~b.js (vendors~a~async-a~async-b~b) 20 bytes <{9}> ={0}= ={11}= ={10}= ={1}= ={7}= ={6}= >{3}< >{5}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~b) + chunk {2} default/async-b~async-c~async-g~b~c.js (async-b~async-c~async-g~b~c) 20 bytes <{0}> <{3}> <{1}> <{8}> <{10}> <{9}> ={5}= ={0}= ={4}= ={1}= ={7}= ={3}= ={6}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g~b~c) + > ./g [] 6:0-47 + > ./g [] 6:0-47 + > ./c [8] ./index.js 3:0-47 + > ./b [8] ./index.js 2:0-47 + [1] ./f.js 20 bytes {2} {11} {12} [built] + chunk {3} default/vendors~a~async-a~async-b~b.js (vendors~a~async-a~async-b~b) 20 bytes <{9}> ={0}= ={11}= ={10}= ={1}= ={2}= ={6}= ={8}= >{2}< >{5}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~b) > ./b b > ./a a > ./b [8] ./index.js 2:0-47 > ./a [8] ./index.js 1:0-47 - [3] ./node_modules/y.js 20 bytes {2} [built] - chunk {3} default/async-b~async-c~async-g~b~c.js (async-b~async-c~async-g~b~c) 20 bytes <{0}> <{2}> <{1}> <{6}> <{10}> <{9}> ={5}= ={0}= ={4}= ={1}= ={8}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g~b~c) - > ./g [] 6:0-47 - > ./g [] 6:0-47 - > ./c [8] ./index.js 3:0-47 - [1] ./f.js 20 bytes {3} {7} {11} {12} [built] - chunk {4} default/vendors~async-c~c.js (vendors~async-c~c) 20 bytes <{9}> ={0}= ={12}= ={1}= ={3}= ={8}= [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-c~c) + [3] ./node_modules/y.js 20 bytes {3} [built] + chunk {4} default/vendors~async-c~c.js (vendors~async-c~c) 20 bytes <{9}> ={0}= ={12}= ={1}= ={2}= ={7}= [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-c~c) > ./c c > ./c [8] ./index.js 3:0-47 [7] ./node_modules/z.js 20 bytes {4} [built] - chunk {5} default/async-g.js (async-g) 34 bytes <{0}> <{2}> <{1}> <{6}> <{10}> ={3}= [rendered] + chunk {5} default/async-g.js (async-g) 34 bytes <{0}> <{3}> <{1}> <{8}> <{10}> ={2}= [rendered] > ./g [] 6:0-47 > ./g [] 6:0-47 [9] ./g.js 34 bytes {5} [built] - chunk {6} default/async-a.js (async-a) 156 bytes <{9}> ={0}= ={2}= ={1}= >{3}< >{5}< [rendered] + chunk {6} default/async-b.js (async-b) 72 bytes <{9}> ={0}= ={3}= ={1}= ={2}= [rendered] + > ./b [8] ./index.js 2:0-47 + [4] ./b.js 72 bytes {6} {11} [built] + chunk {7} default/async-c.js (async-c) 72 bytes <{9}> ={0}= ={4}= ={1}= ={2}= [rendered] + > ./c [8] ./index.js 3:0-47 + [5] ./c.js 72 bytes {7} {12} [built] + chunk {8} default/a~async-a.js (a~async-a) 156 bytes <{9}> ={0}= ={3}= ={1}= >{2}< >{5}< [rendered] split chunk (cache group: default) (name: a~async-a) > ./a [8] ./index.js 1:0-47 - [6] ./a.js + 1 modules 156 bytes {6} {10} [built] + [6] ./a.js + 1 modules 156 bytes {8} {10} [built] | ./a.js 121 bytes [built] | ./e.js 20 bytes [built] - chunk {7} default/async-b.js (async-b) 92 bytes <{9}> ={0}= ={2}= ={1}= [rendered] - > ./b [8] ./index.js 2:0-47 - [1] ./f.js 20 bytes {3} {7} {11} {12} [built] - [4] ./b.js 72 bytes {7} {11} [built] - chunk {8} default/async-c.js (async-c) 72 bytes <{9}> ={0}= ={4}= ={1}= ={3}= [rendered] - > ./c [8] ./index.js 3:0-47 - [5] ./c.js 72 bytes {8} {12} [built] - chunk {9} default/main.js (main) 147 bytes >{0}< >{2}< >{1}< >{6}< >{7}< >{4}< >{3}< >{8}< [entry] [rendered] + chunk {9} default/main.js (main) 147 bytes >{0}< >{3}< >{1}< >{2}< >{6}< >{8}< >{4}< >{7}< [entry] [rendered] > ./ main [8] ./index.js 147 bytes {9} [built] - chunk {10} default/a.js (a) 176 bytes ={0}= ={2}= >{3}< >{5}< [entry] [rendered] + chunk {10} default/a.js (a) 176 bytes ={0}= ={3}= >{2}< >{5}< [entry] [rendered] > ./a a [0] ./d.js 20 bytes {1} {10} {11} {12} [built] - [6] ./a.js + 1 modules 156 bytes {6} {10} [built] + [6] ./a.js + 1 modules 156 bytes {8} {10} [built] | ./a.js 121 bytes [built] | ./e.js 20 bytes [built] - chunk {11} default/b.js (b) 112 bytes ={0}= ={2}= [entry] [rendered] + chunk {11} default/b.js (b) 112 bytes ={0}= ={3}= [entry] [rendered] > ./b b [0] ./d.js 20 bytes {1} {10} {11} {12} [built] - [1] ./f.js 20 bytes {3} {7} {11} {12} [built] - [4] ./b.js 72 bytes {7} {11} [built] + [1] ./f.js 20 bytes {2} {11} {12} [built] + [4] ./b.js 72 bytes {6} {11} [built] chunk {12} default/c.js (c) 112 bytes ={0}= ={4}= [entry] [rendered] > ./c c [0] ./d.js 20 bytes {1} {10} {11} {12} [built] - [1] ./f.js 20 bytes {3} {7} {11} {12} [built] - [5] ./c.js 72 bytes {8} {12} [built] + [1] ./f.js 20 bytes {2} {11} {12} [built] + [5] ./c.js 72 bytes {7} {12} [built] Child manual: Entrypoint main = default/main.js Entrypoint a = default/vendors.js default/a.js @@ -195,7 +195,7 @@ Child name-too-long: Entrypoint aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa = vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~716093be.js vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.js aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.js Entrypoint bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb = vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~716093be.js vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.js bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.js Entrypoint cccccccccccccccccccccccccccccc = vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~716093be.js vendors~async-c~cccccccccccccccccccccccccccccc.js cccccccccccccccccccccccccccccc.js - chunk {0} vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~716093be.js (vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~716093be) 20 bytes <{9}> ={4}= ={12}= ={2}= ={11}= ={10}= ={1}= ={3}= ={8}= ={7}= ={6}= >{3}< >{5}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~716093be) + chunk {0} vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~716093be.js (vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~716093be) 20 bytes <{9}> ={4}= ={12}= ={3}= ={11}= ={10}= ={1}= ={2}= ={7}= ={6}= ={8}= >{2}< >{5}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~716093be) > ./c cccccccccccccccccccccccccccccc > ./b bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb > ./a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa @@ -203,58 +203,58 @@ Child name-too-long: > ./b [8] ./index.js 2:0-47 > ./a [8] ./index.js 1:0-47 [2] ./node_modules/x.js 20 bytes {0} [built] - chunk {1} aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccc~e7d53185.js (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccc~e7d53185) 20 bytes <{9}> ={0}= ={4}= ={3}= ={8}= ={2}= ={7}= ={6}= >{3}< >{5}< [rendered] split chunk (cache group: default) (name: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccc~e7d53185) + chunk {1} aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccc~e7d53185.js (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccc~e7d53185) 20 bytes <{9}> ={0}= ={4}= ={2}= ={7}= ={3}= ={6}= ={8}= >{2}< >{5}< [rendered] split chunk (cache group: default) (name: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccc~e7d53185) > ./c [8] ./index.js 3:0-47 > ./b [8] ./index.js 2:0-47 > ./a [8] ./index.js 1:0-47 [0] ./d.js 20 bytes {1} {10} {11} {12} [built] - chunk {2} vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.js (vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb) 20 bytes <{9}> ={0}= ={11}= ={10}= ={1}= ={7}= ={6}= >{3}< >{5}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb) + chunk {2} async-b~async-c~async-g~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccccccccccccccccccc.js (async-b~async-c~async-g~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccccccccccccccccccc) 20 bytes <{0}> <{3}> <{1}> <{8}> <{10}> <{9}> ={5}= ={0}= ={4}= ={1}= ={7}= ={3}= ={6}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccccccccccccccccccc) + > ./g [] 6:0-47 + > ./g [] 6:0-47 + > ./c [8] ./index.js 3:0-47 + > ./b [8] ./index.js 2:0-47 + [1] ./f.js 20 bytes {2} {11} {12} [built] + chunk {3} vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.js (vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb) 20 bytes <{9}> ={0}= ={11}= ={10}= ={1}= ={2}= ={6}= ={8}= >{2}< >{5}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb) > ./b bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb > ./a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa > ./b [8] ./index.js 2:0-47 > ./a [8] ./index.js 1:0-47 - [3] ./node_modules/y.js 20 bytes {2} [built] - chunk {3} async-b~async-c~async-g~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccccccccccccccccccc.js (async-b~async-c~async-g~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccccccccccccccccccc) 20 bytes <{0}> <{2}> <{1}> <{6}> <{10}> <{9}> ={5}= ={0}= ={4}= ={1}= ={8}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccccccccccccccccccc) - > ./g [] 6:0-47 - > ./g [] 6:0-47 - > ./c [8] ./index.js 3:0-47 - [1] ./f.js 20 bytes {3} {7} {11} {12} [built] - chunk {4} vendors~async-c~cccccccccccccccccccccccccccccc.js (vendors~async-c~cccccccccccccccccccccccccccccc) 20 bytes <{9}> ={0}= ={12}= ={1}= ={3}= ={8}= [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-c~cccccccccccccccccccccccccccccc) + [3] ./node_modules/y.js 20 bytes {3} [built] + chunk {4} vendors~async-c~cccccccccccccccccccccccccccccc.js (vendors~async-c~cccccccccccccccccccccccccccccc) 20 bytes <{9}> ={0}= ={12}= ={1}= ={2}= ={7}= [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-c~cccccccccccccccccccccccccccccc) > ./c cccccccccccccccccccccccccccccc > ./c [8] ./index.js 3:0-47 [7] ./node_modules/z.js 20 bytes {4} [built] - chunk {5} async-g.js (async-g) 34 bytes <{0}> <{2}> <{1}> <{6}> <{10}> ={3}= [rendered] + chunk {5} async-g.js (async-g) 34 bytes <{0}> <{3}> <{1}> <{8}> <{10}> ={2}= [rendered] > ./g [] 6:0-47 > ./g [] 6:0-47 [9] ./g.js 34 bytes {5} [built] - chunk {6} async-a.js (async-a) 156 bytes <{9}> ={0}= ={2}= ={1}= >{3}< >{5}< [rendered] + chunk {6} async-b.js (async-b) 72 bytes <{9}> ={0}= ={3}= ={1}= ={2}= [rendered] + > ./b [8] ./index.js 2:0-47 + [4] ./b.js 72 bytes {6} {11} [built] + chunk {7} async-c.js (async-c) 72 bytes <{9}> ={0}= ={4}= ={1}= ={2}= [rendered] + > ./c [8] ./index.js 3:0-47 + [5] ./c.js 72 bytes {7} {12} [built] + chunk {8} aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a.js (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a) 156 bytes <{9}> ={0}= ={3}= ={1}= >{2}< >{5}< [rendered] split chunk (cache group: default) (name: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a) > ./a [8] ./index.js 1:0-47 - [6] ./a.js + 1 modules 156 bytes {6} {10} [built] + [6] ./a.js + 1 modules 156 bytes {8} {10} [built] | ./a.js 121 bytes [built] | ./e.js 20 bytes [built] - chunk {7} async-b.js (async-b) 92 bytes <{9}> ={0}= ={2}= ={1}= [rendered] - > ./b [8] ./index.js 2:0-47 - [1] ./f.js 20 bytes {3} {7} {11} {12} [built] - [4] ./b.js 72 bytes {7} {11} [built] - chunk {8} async-c.js (async-c) 72 bytes <{9}> ={0}= ={4}= ={1}= ={3}= [rendered] - > ./c [8] ./index.js 3:0-47 - [5] ./c.js 72 bytes {8} {12} [built] - chunk {9} main.js (main) 147 bytes >{0}< >{2}< >{1}< >{6}< >{7}< >{4}< >{3}< >{8}< [entry] [rendered] + chunk {9} main.js (main) 147 bytes >{0}< >{3}< >{1}< >{2}< >{6}< >{8}< >{4}< >{7}< [entry] [rendered] > ./ main [8] ./index.js 147 bytes {9} [built] - chunk {10} aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.js (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) 176 bytes ={0}= ={2}= >{3}< >{5}< [entry] [rendered] + chunk {10} aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.js (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) 176 bytes ={0}= ={3}= >{2}< >{5}< [entry] [rendered] > ./a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa [0] ./d.js 20 bytes {1} {10} {11} {12} [built] - [6] ./a.js + 1 modules 156 bytes {6} {10} [built] + [6] ./a.js + 1 modules 156 bytes {8} {10} [built] | ./a.js 121 bytes [built] | ./e.js 20 bytes [built] - chunk {11} bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.js (bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb) 112 bytes ={0}= ={2}= [entry] [rendered] + chunk {11} bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.js (bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb) 112 bytes ={0}= ={3}= [entry] [rendered] > ./b bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb [0] ./d.js 20 bytes {1} {10} {11} {12} [built] - [1] ./f.js 20 bytes {3} {7} {11} {12} [built] - [4] ./b.js 72 bytes {7} {11} [built] + [1] ./f.js 20 bytes {2} {11} {12} [built] + [4] ./b.js 72 bytes {6} {11} [built] chunk {12} cccccccccccccccccccccccccccccc.js (cccccccccccccccccccccccccccccc) 112 bytes ={0}= ={4}= [entry] [rendered] > ./c cccccccccccccccccccccccccccccc [0] ./d.js 20 bytes {1} {10} {11} {12} [built] - [1] ./f.js 20 bytes {3} {7} {11} {12} [built] - [5] ./c.js 72 bytes {8} {12} [built] \ No newline at end of file + [1] ./f.js 20 bytes {2} {11} {12} [built] + [5] ./c.js 72 bytes {7} {12} [built] \ No newline at end of file From 7d2a4e5af550d74d350134dca3a72a38cea5918f Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Sat, 17 Feb 2018 09:46:57 +0100 Subject: [PATCH 085/112] sort parents, children, siblings in stats --- lib/Stats.js | 18 ++- .../aggressive-splitting-entry/expected.txt | 12 +- .../expected.txt | 18 +-- .../async-commons-chunk-auto/expected.txt | 112 ++++++++--------- .../async-commons-chunk/expected.txt | 4 +- .../limit-chunk-count-plugin/expected.txt | 10 +- .../module-deduplication/expected.txt | 6 +- test/statsCases/optimize-chunks/expected.txt | 6 +- .../split-chunks-combinations/expected.txt | 4 +- .../split-chunks-issue-6413/expected.txt | 12 +- .../expected.txt | 6 +- test/statsCases/split-chunks/expected.txt | 116 +++++++++--------- 12 files changed, 167 insertions(+), 157 deletions(-) diff --git a/lib/Stats.js b/lib/Stats.js index 90aa33058..0347250e7 100644 --- a/lib/Stats.js +++ b/lib/Stats.js @@ -448,9 +448,9 @@ class Stats { names: chunk.name ? [chunk.name] : [], files: chunk.files.slice(), hash: chunk.renderedHash, - siblings: Array.from(siblings), - parents: Array.from(parents), - children: Array.from(children) + siblings: Array.from(siblings).sort(), + parents: Array.from(parents).sort(), + children: Array.from(children).sort() }; if(showChunkModules) { obj.modules = chunk @@ -472,7 +472,17 @@ class Stats { loc: formatLocation(origin.loc), request: origin.request, reasons: origin.reasons || [] - })); + })).sort((a, b) => { + if(typeof a.moduleId === "number" && typeof b.moduleId !== "number") return 1; + if(typeof a.moduleId !== "number" && typeof b.moduleId === "number") return -1; + if(typeof a.moduleId === "number" && typeof b.moduleId === "number") { + const diffId = a.moduleId - b.moduleId; + if(diffId !== 0) return diffId; + } + if(a.loc < b.loc) return -1; + if(a.loc > b.loc) return 1; + return 0; + }); } return obj; }); diff --git a/test/statsCases/aggressive-splitting-entry/expected.txt b/test/statsCases/aggressive-splitting-entry/expected.txt index f11f0b979..1b54686d8 100644 --- a/test/statsCases/aggressive-splitting-entry/expected.txt +++ b/test/statsCases/aggressive-splitting-entry/expected.txt @@ -9,7 +9,7 @@ Child fitting: 4c485a9e1dc58eedfbd1.js 1.94 KiB 2 [emitted] 337c857e3e34cc5ef72d.js 1.94 KiB 3 [emitted] Entrypoint main = 4c485a9e1dc58eedfbd1.js 337c857e3e34cc5ef72d.js a65f8652fd07c12d0049.js - chunk {0} 706f97eb6a2b8fb1a17e.js 916 bytes <{2}> <{3}> <{1}> + chunk {0} 706f97eb6a2b8fb1a17e.js 916 bytes <{1}> <{2}> <{3}> > ./g [4] ./index.js 7:0-13 [7] ./g.js 916 bytes {0} [built] chunk {1} a65f8652fd07c12d0049.js 1.87 KiB ={2}= ={3}= >{0}< [entry] [rendered] @@ -17,11 +17,11 @@ Child fitting: [3] ./e.js 899 bytes {1} [built] [4] ./index.js 111 bytes {1} [built] [6] ./f.js 900 bytes {1} [built] - chunk {2} 4c485a9e1dc58eedfbd1.js 1.76 KiB ={3}= ={1}= >{0}< [initial] [rendered] [recorded] aggressive splitted + chunk {2} 4c485a9e1dc58eedfbd1.js 1.76 KiB ={1}= ={3}= >{0}< [initial] [rendered] [recorded] aggressive splitted > ./index main [0] ./b.js 899 bytes {2} [built] [5] ./a.js 899 bytes {2} [built] - chunk {3} 337c857e3e34cc5ef72d.js 1.76 KiB ={2}= ={1}= >{0}< [initial] [rendered] [recorded] aggressive splitted + chunk {3} 337c857e3e34cc5ef72d.js 1.76 KiB ={1}= ={2}= >{0}< [initial] [rendered] [recorded] aggressive splitted > ./index main [1] ./c.js 899 bytes {3} [built] [2] ./d.js 899 bytes {3} [built] @@ -35,7 +35,7 @@ Child content-change: 4c485a9e1dc58eedfbd1.js 1.94 KiB 2 [emitted] 337c857e3e34cc5ef72d.js 1.94 KiB 3 [emitted] Entrypoint main = 4c485a9e1dc58eedfbd1.js 337c857e3e34cc5ef72d.js a65f8652fd07c12d0049.js - chunk {0} 706f97eb6a2b8fb1a17e.js 916 bytes <{2}> <{3}> <{1}> + chunk {0} 706f97eb6a2b8fb1a17e.js 916 bytes <{1}> <{2}> <{3}> > ./g [4] ./index.js 7:0-13 [7] ./g.js 916 bytes {0} [built] chunk {1} a65f8652fd07c12d0049.js 1.87 KiB ={2}= ={3}= >{0}< [entry] [rendered] @@ -43,11 +43,11 @@ Child content-change: [3] ./e.js 899 bytes {1} [built] [4] ./index.js 111 bytes {1} [built] [6] ./f.js 900 bytes {1} [built] - chunk {2} 4c485a9e1dc58eedfbd1.js 1.76 KiB ={3}= ={1}= >{0}< [initial] [rendered] [recorded] aggressive splitted + chunk {2} 4c485a9e1dc58eedfbd1.js 1.76 KiB ={1}= ={3}= >{0}< [initial] [rendered] [recorded] aggressive splitted > ./index main [0] ./b.js 899 bytes {2} [built] [5] ./a.js 899 bytes {2} [built] - chunk {3} 337c857e3e34cc5ef72d.js 1.76 KiB ={2}= ={1}= >{0}< [initial] [rendered] [recorded] aggressive splitted + chunk {3} 337c857e3e34cc5ef72d.js 1.76 KiB ={1}= ={2}= >{0}< [initial] [rendered] [recorded] aggressive splitted > ./index main [1] ./c.js 899 bytes {3} [built] [2] ./d.js 899 bytes {3} [built] \ No newline at end of file diff --git a/test/statsCases/aggressive-splitting-on-demand/expected.txt b/test/statsCases/aggressive-splitting-on-demand/expected.txt index 303da3802..f6ce02e03 100644 --- a/test/statsCases/aggressive-splitting-on-demand/expected.txt +++ b/test/statsCases/aggressive-splitting-on-demand/expected.txt @@ -14,24 +14,24 @@ a28f1d7d7367daaaf00a.js 1 KiB 7 [emitted] 9ac0014114101e5f7d2c.js 1.94 KiB 9, 1 [emitted] f507739d37522e79688a.js 8.38 KiB 10 [emitted] main Entrypoint main = f507739d37522e79688a.js -chunk {0} ba1a8dd27d611254d495.js 1.76 KiB <{10}> ={2}= ={3}= ={9}= ={7}= ={1}= [recorded] aggressive splitted - > ./b ./d ./e ./f ./g ./h ./i ./j ./k [11] ./index.js 6:0-72 +chunk {0} ba1a8dd27d611254d495.js 1.76 KiB <{10}> ={1}= ={2}= ={3}= ={7}= ={9}= [recorded] aggressive splitted > ./b ./d ./e ./f ./g [11] ./index.js 5:0-44 + > ./b ./d ./e ./f ./g ./h ./i ./j ./k [11] ./index.js 6:0-72 [0] ./b.js 899 bytes {0} {5} [built] [1] ./d.js 899 bytes {0} {8} [built] -chunk {1} f4818881f9e5138ad8ac.js 899 bytes <{10}> ={8}= ={0}= ={2}= +chunk {1} f4818881f9e5138ad8ac.js 899 bytes <{10}> ={0}= ={2}= ={8}= > ./c ./d ./e [11] ./index.js 3:0-30 > ./b ./d ./e ./f ./g [11] ./index.js 5:0-44 [2] ./e.js 899 bytes {1} {9} [built] -chunk {2} 81950df8ced1664c8037.js 1.76 KiB <{10}> ={0}= ={3}= ={9}= ={7}= ={1}= ={6}= [recorded] aggressive splitted - > ./b ./d ./e ./f ./g ./h ./i ./j ./k [11] ./index.js 6:0-72 - > ./b ./d ./e ./f ./g [11] ./index.js 5:0-44 +chunk {2} 81950df8ced1664c8037.js 1.76 KiB <{10}> ={0}= ={1}= ={3}= ={6}= ={7}= ={9}= [recorded] aggressive splitted > ./f ./g ./h ./i ./j ./k [11] ./index.js 4:0-51 + > ./b ./d ./e ./f ./g [11] ./index.js 5:0-44 + > ./b ./d ./e ./f ./g ./h ./i ./j ./k [11] ./index.js 6:0-72 [3] ./f.js 899 bytes {2} [built] [4] ./g.js 901 bytes {2} [built] -chunk {3} 2a7cf3b38962fac54bb9.js 1.76 KiB <{10}> ={0}= ={2}= ={9}= ={7}= ={6}= [recorded] aggressive splitted - > ./b ./d ./e ./f ./g ./h ./i ./j ./k [11] ./index.js 6:0-72 +chunk {3} 2a7cf3b38962fac54bb9.js 1.76 KiB <{10}> ={0}= ={2}= ={6}= ={7}= ={9}= [recorded] aggressive splitted > ./f ./g ./h ./i ./j ./k [11] ./index.js 4:0-51 + > ./b ./d ./e ./f ./g ./h ./i ./j ./k [11] ./index.js 6:0-72 [6] ./h.js 899 bytes {3} [built] [7] ./i.js 899 bytes {3} [built] chunk {4} acfde31fdfbd1bdb41c4.js 899 bytes <{10}> @@ -56,6 +56,6 @@ chunk {9} 9ac0014114101e5f7d2c.js 1.76 KiB <{10}> ={0}= ={2}= ={3}= ={7}= [re > ./b ./d ./e ./f ./g ./h ./i ./j ./k [11] ./index.js 6:0-72 [2] ./e.js 899 bytes {1} {9} [built] [8] ./j.js 901 bytes {6} {9} [built] -chunk {10} f507739d37522e79688a.js (main) 248 bytes >{0}< >{2}< >{1}< >{3}< >{9}< >{7}< >{6}< >{4}< >{5}< >{8}< [entry] +chunk {10} f507739d37522e79688a.js (main) 248 bytes >{0}< >{1}< >{2}< >{3}< >{4}< >{5}< >{6}< >{7}< >{8}< >{9}< [entry] > ./index main [11] ./index.js 248 bytes {10} [built] \ No newline at end of file diff --git a/test/statsCases/async-commons-chunk-auto/expected.txt b/test/statsCases/async-commons-chunk-auto/expected.txt index 058595e80..711564936 100644 --- a/test/statsCases/async-commons-chunk-auto/expected.txt +++ b/test/statsCases/async-commons-chunk-auto/expected.txt @@ -62,45 +62,45 @@ Child default: Entrypoint a = default/a.js Entrypoint b = default/b.js Entrypoint c = default/c.js - chunk {0} default/vendors~async-a~async-b~async-c.js (vendors~async-a~async-b~async-c) 20 bytes <{9}> ={8}= ={1}= ={2}= ={7}= ={3}= ={6}= ={5}= >{2}< >{4}< [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b~async-c) - > ./c [8] ./index.js 3:0-47 - > ./b [8] ./index.js 2:0-47 + chunk {0} default/vendors~async-a~async-b~async-c.js (vendors~async-a~async-b~async-c) 20 bytes <{9}> ={1}= ={2}= ={3}= ={5}= ={6}= ={7}= ={8}= >{2}< >{4}< [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b~async-c) > ./a [8] ./index.js 1:0-47 + > ./b [8] ./index.js 2:0-47 + > ./c [8] ./index.js 3:0-47 [1] ./node_modules/x.js 20 bytes {0} {10} {11} {12} [built] - chunk {1} default/async-a~async-b~async-c.js (async-a~async-b~async-c) 20 bytes <{9}> ={0}= ={8}= ={2}= ={7}= ={3}= ={6}= ={5}= >{2}< >{4}< [rendered] split chunk (cache group: default) (name: async-a~async-b~async-c) - > ./c [8] ./index.js 3:0-47 - > ./b [8] ./index.js 2:0-47 + chunk {1} default/async-a~async-b~async-c.js (async-a~async-b~async-c) 20 bytes <{9}> ={0}= ={2}= ={3}= ={5}= ={6}= ={7}= ={8}= >{2}< >{4}< [rendered] split chunk (cache group: default) (name: async-a~async-b~async-c) > ./a [8] ./index.js 1:0-47 + > ./b [8] ./index.js 2:0-47 + > ./c [8] ./index.js 3:0-47 [0] ./d.js 20 bytes {1} {10} {11} {12} [built] - chunk {2} default/async-b~async-c~async-g.js (async-b~async-c~async-g) 20 bytes <{0}> <{3}> <{1}> <{5}> <{10}> <{9}> ={4}= ={0}= ={8}= ={1}= ={7}= ={3}= ={6}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g) + chunk {2} default/async-b~async-c~async-g.js (async-b~async-c~async-g) 20 bytes <{0}> <{1}> <{10}> <{3}> <{5}> <{9}> ={0}= ={1}= ={3}= ={4}= ={6}= ={7}= ={8}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g) > ./g [] 6:0-47 > ./g [] 6:0-47 + > ./b [8] ./index.js 2:0-47 > ./c [8] ./index.js 3:0-47 - > ./b [8] ./index.js 2:0-47 [2] ./f.js 20 bytes {2} {11} {12} [built] - chunk {3} default/vendors~async-a~async-b.js (vendors~async-a~async-b) 20 bytes <{9}> ={0}= ={1}= ={2}= ={6}= ={5}= >{2}< >{4}< [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b) - > ./b [8] ./index.js 2:0-47 + chunk {3} default/vendors~async-a~async-b.js (vendors~async-a~async-b) 20 bytes <{9}> ={0}= ={1}= ={2}= ={5}= ={6}= >{2}< >{4}< [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b) > ./a [8] ./index.js 1:0-47 + > ./b [8] ./index.js 2:0-47 [3] ./node_modules/y.js 20 bytes {3} {10} {11} [built] - chunk {4} default/async-g.js (async-g) 34 bytes <{0}> <{3}> <{1}> <{5}> <{10}> ={2}= [rendered] + chunk {4} default/async-g.js (async-g) 34 bytes <{0}> <{1}> <{10}> <{3}> <{5}> ={2}= [rendered] > ./g [] 6:0-47 > ./g [] 6:0-47 [9] ./g.js 34 bytes {4} [built] - chunk {5} default/async-a.js (async-a) 156 bytes <{9}> ={0}= ={3}= ={1}= >{2}< >{4}< [rendered] + chunk {5} default/async-a.js (async-a) 156 bytes <{9}> ={0}= ={1}= ={3}= >{2}< >{4}< [rendered] > ./a [8] ./index.js 1:0-47 [7] ./a.js + 1 modules 156 bytes {5} {10} [built] | ./a.js 121 bytes [built] | ./e.js 20 bytes [built] - chunk {6} default/async-b.js (async-b) 72 bytes <{9}> ={0}= ={3}= ={1}= ={2}= [rendered] + chunk {6} default/async-b.js (async-b) 72 bytes <{9}> ={0}= ={1}= ={2}= ={3}= [rendered] > ./b [8] ./index.js 2:0-47 [5] ./b.js 72 bytes {6} {11} [built] - chunk {7} default/async-c.js (async-c) 72 bytes <{9}> ={0}= ={8}= ={1}= ={2}= [rendered] + chunk {7} default/async-c.js (async-c) 72 bytes <{9}> ={0}= ={1}= ={2}= ={8}= [rendered] > ./c [8] ./index.js 3:0-47 [6] ./c.js 72 bytes {7} {12} [built] chunk {8} default/vendors~async-c.js (vendors~async-c) 20 bytes <{9}> ={0}= ={1}= ={2}= ={7}= [rendered] split chunk (cache group: vendors) (name: vendors~async-c) > ./c [8] ./index.js 3:0-47 [4] ./node_modules/z.js 20 bytes {8} {12} [built] - chunk {9} default/main.js (main) 147 bytes >{0}< >{3}< >{1}< >{2}< >{6}< >{5}< >{8}< >{7}< [entry] [rendered] + chunk {9} default/main.js (main) 147 bytes >{0}< >{1}< >{2}< >{3}< >{5}< >{6}< >{7}< >{8}< [entry] [rendered] > ./ main [8] ./index.js 147 bytes {9} [built] chunk {10} default/a.js (a) 216 bytes >{2}< >{4}< [entry] [rendered] @@ -157,10 +157,10 @@ Child vendors: [2] ./f.js 20 bytes {0} {2} {3} {7} {8} [built] [4] ./node_modules/z.js 20 bytes {3} {4} [built] [6] ./c.js 72 bytes {3} {8} [built] - chunk {4} vendors/vendors.js (vendors) 60 bytes ={8}= ={7}= ={6}= >{0}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors) - > ./c c - > ./b b + chunk {4} vendors/vendors.js (vendors) 60 bytes ={6}= ={7}= ={8}= >{0}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors) > ./a a + > ./b b + > ./c c [1] ./node_modules/x.js 20 bytes {1} {2} {3} {4} [built] [3] ./node_modules/y.js 20 bytes {1} {2} {4} [built] [4] ./node_modules/z.js 20 bytes {3} {4} [built] @@ -188,51 +188,51 @@ Child multiple-vendors: Entrypoint a = multiple-vendors/libs-x.js multiple-vendors/vendors~a~async-a~async-b~b.js multiple-vendors/a.js Entrypoint b = multiple-vendors/libs-x.js multiple-vendors/vendors~a~async-a~async-b~b.js multiple-vendors/b.js Entrypoint c = multiple-vendors/libs-x.js multiple-vendors/vendors~async-c~c.js multiple-vendors/c.js - chunk {0} multiple-vendors/libs-x.js (libs-x) 20 bytes <{9}> ={4}= ={12}= ={3}= ={11}= ={10}= ={1}= ={2}= ={7}= ={6}= ={8}= >{2}< >{5}< [initial] [rendered] split chunk (cache group: libs) (name: libs-x) + chunk {0} multiple-vendors/libs-x.js (libs-x) 20 bytes <{9}> ={1}= ={10}= ={11}= ={12}= ={2}= ={3}= ={4}= ={6}= ={7}= ={8}= >{2}< >{5}< [initial] [rendered] split chunk (cache group: libs) (name: libs-x) + > ./a a + > ./b b > ./c c - > ./b b - > ./a a - > ./c [8] ./index.js 3:0-47 - > ./b [8] ./index.js 2:0-47 > ./a [8] ./index.js 1:0-47 + > ./b [8] ./index.js 2:0-47 + > ./c [8] ./index.js 3:0-47 [2] ./node_modules/x.js 20 bytes {0} [built] - chunk {1} multiple-vendors/a~async-a~async-b~async-c~b~c.js (a~async-a~async-b~async-c~b~c) 20 bytes <{9}> ={0}= ={4}= ={2}= ={7}= ={3}= ={6}= ={8}= >{2}< >{5}< [rendered] split chunk (cache group: default) (name: a~async-a~async-b~async-c~b~c) - > ./c [8] ./index.js 3:0-47 - > ./b [8] ./index.js 2:0-47 + chunk {1} multiple-vendors/a~async-a~async-b~async-c~b~c.js (a~async-a~async-b~async-c~b~c) 20 bytes <{9}> ={0}= ={2}= ={3}= ={4}= ={6}= ={7}= ={8}= >{2}< >{5}< [rendered] split chunk (cache group: default) (name: a~async-a~async-b~async-c~b~c) > ./a [8] ./index.js 1:0-47 + > ./b [8] ./index.js 2:0-47 + > ./c [8] ./index.js 3:0-47 [0] ./d.js 20 bytes {1} {10} {11} {12} [built] - chunk {2} multiple-vendors/async-b~async-c~async-g~b~c.js (async-b~async-c~async-g~b~c) 20 bytes <{0}> <{3}> <{1}> <{8}> <{10}> <{9}> ={5}= ={0}= ={4}= ={1}= ={7}= ={3}= ={6}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g~b~c) + chunk {2} multiple-vendors/async-b~async-c~async-g~b~c.js (async-b~async-c~async-g~b~c) 20 bytes <{0}> <{1}> <{10}> <{3}> <{8}> <{9}> ={0}= ={1}= ={3}= ={4}= ={5}= ={6}= ={7}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g~b~c) > ./g [] 6:0-47 > ./g [] 6:0-47 + > ./b [8] ./index.js 2:0-47 > ./c [8] ./index.js 3:0-47 - > ./b [8] ./index.js 2:0-47 [1] ./f.js 20 bytes {2} {11} {12} [built] - chunk {3} multiple-vendors/vendors~a~async-a~async-b~b.js (vendors~a~async-a~async-b~b) 20 bytes <{9}> ={0}= ={11}= ={10}= ={1}= ={2}= ={6}= ={8}= >{2}< >{5}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~b) - > ./b b + chunk {3} multiple-vendors/vendors~a~async-a~async-b~b.js (vendors~a~async-a~async-b~b) 20 bytes <{9}> ={0}= ={1}= ={10}= ={11}= ={2}= ={6}= ={8}= >{2}< >{5}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~b) > ./a a - > ./b [8] ./index.js 2:0-47 + > ./b b > ./a [8] ./index.js 1:0-47 + > ./b [8] ./index.js 2:0-47 [3] ./node_modules/y.js 20 bytes {3} [built] - chunk {4} multiple-vendors/vendors~async-c~c.js (vendors~async-c~c) 20 bytes <{9}> ={0}= ={12}= ={1}= ={2}= ={7}= [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-c~c) + chunk {4} multiple-vendors/vendors~async-c~c.js (vendors~async-c~c) 20 bytes <{9}> ={0}= ={1}= ={12}= ={2}= ={7}= [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-c~c) > ./c c > ./c [8] ./index.js 3:0-47 [7] ./node_modules/z.js 20 bytes {4} [built] - chunk {5} multiple-vendors/async-g.js (async-g) 34 bytes <{0}> <{3}> <{1}> <{8}> <{10}> ={2}= [rendered] + chunk {5} multiple-vendors/async-g.js (async-g) 34 bytes <{0}> <{1}> <{10}> <{3}> <{8}> ={2}= [rendered] > ./g [] 6:0-47 > ./g [] 6:0-47 [9] ./g.js 34 bytes {5} [built] - chunk {6} multiple-vendors/async-b.js (async-b) 72 bytes <{9}> ={0}= ={3}= ={1}= ={2}= [rendered] + chunk {6} multiple-vendors/async-b.js (async-b) 72 bytes <{9}> ={0}= ={1}= ={2}= ={3}= [rendered] > ./b [8] ./index.js 2:0-47 [4] ./b.js 72 bytes {6} {11} [built] - chunk {7} multiple-vendors/async-c.js (async-c) 72 bytes <{9}> ={0}= ={4}= ={1}= ={2}= [rendered] + chunk {7} multiple-vendors/async-c.js (async-c) 72 bytes <{9}> ={0}= ={1}= ={2}= ={4}= [rendered] > ./c [8] ./index.js 3:0-47 [5] ./c.js 72 bytes {7} {12} [built] - chunk {8} multiple-vendors/a~async-a.js (a~async-a) 156 bytes <{9}> ={0}= ={3}= ={1}= >{2}< >{5}< [rendered] split chunk (cache group: default) (name: a~async-a) + chunk {8} multiple-vendors/a~async-a.js (a~async-a) 156 bytes <{9}> ={0}= ={1}= ={3}= >{2}< >{5}< [rendered] split chunk (cache group: default) (name: a~async-a) > ./a [8] ./index.js 1:0-47 [6] ./a.js + 1 modules 156 bytes {8} {10} [built] | ./a.js 121 bytes [built] | ./e.js 20 bytes [built] - chunk {9} multiple-vendors/main.js (main) 147 bytes >{0}< >{3}< >{1}< >{2}< >{6}< >{8}< >{4}< >{7}< [entry] [rendered] + chunk {9} multiple-vendors/main.js (main) 147 bytes >{0}< >{1}< >{2}< >{3}< >{4}< >{6}< >{7}< >{8}< [entry] [rendered] > ./ main [8] ./index.js 147 bytes {9} [built] chunk {10} multiple-vendors/a.js (a) 176 bytes ={0}= ={3}= >{2}< >{5}< [entry] [rendered] @@ -256,51 +256,51 @@ Child all: Entrypoint a = all/vendors~a~async-a~async-b~async-c~b~c.js all/vendors~a~async-a~async-b~b.js all/a.js Entrypoint b = all/vendors~a~async-a~async-b~async-c~b~c.js all/vendors~a~async-a~async-b~b.js all/b.js Entrypoint c = all/vendors~a~async-a~async-b~async-c~b~c.js all/vendors~async-c~c.js all/c.js - chunk {0} all/vendors~a~async-a~async-b~async-c~b~c.js (vendors~a~async-a~async-b~async-c~b~c) 20 bytes <{9}> ={4}= ={12}= ={3}= ={11}= ={10}= ={1}= ={2}= ={7}= ={6}= ={8}= >{2}< >{5}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~async-c~b~c) + chunk {0} all/vendors~a~async-a~async-b~async-c~b~c.js (vendors~a~async-a~async-b~async-c~b~c) 20 bytes <{9}> ={1}= ={10}= ={11}= ={12}= ={2}= ={3}= ={4}= ={6}= ={7}= ={8}= >{2}< >{5}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~async-c~b~c) + > ./a a + > ./b b > ./c c - > ./b b - > ./a a - > ./c [8] ./index.js 3:0-47 - > ./b [8] ./index.js 2:0-47 > ./a [8] ./index.js 1:0-47 + > ./b [8] ./index.js 2:0-47 + > ./c [8] ./index.js 3:0-47 [2] ./node_modules/x.js 20 bytes {0} [built] - chunk {1} all/a~async-a~async-b~async-c~b~c.js (a~async-a~async-b~async-c~b~c) 20 bytes <{9}> ={0}= ={4}= ={2}= ={7}= ={3}= ={6}= ={8}= >{2}< >{5}< [rendered] split chunk (cache group: default) (name: a~async-a~async-b~async-c~b~c) - > ./c [8] ./index.js 3:0-47 - > ./b [8] ./index.js 2:0-47 + chunk {1} all/a~async-a~async-b~async-c~b~c.js (a~async-a~async-b~async-c~b~c) 20 bytes <{9}> ={0}= ={2}= ={3}= ={4}= ={6}= ={7}= ={8}= >{2}< >{5}< [rendered] split chunk (cache group: default) (name: a~async-a~async-b~async-c~b~c) > ./a [8] ./index.js 1:0-47 + > ./b [8] ./index.js 2:0-47 + > ./c [8] ./index.js 3:0-47 [0] ./d.js 20 bytes {1} {10} {11} {12} [built] - chunk {2} all/async-b~async-c~async-g~b~c.js (async-b~async-c~async-g~b~c) 20 bytes <{0}> <{3}> <{1}> <{8}> <{10}> <{9}> ={5}= ={0}= ={4}= ={1}= ={7}= ={3}= ={6}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g~b~c) + chunk {2} all/async-b~async-c~async-g~b~c.js (async-b~async-c~async-g~b~c) 20 bytes <{0}> <{1}> <{10}> <{3}> <{8}> <{9}> ={0}= ={1}= ={3}= ={4}= ={5}= ={6}= ={7}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g~b~c) > ./g [] 6:0-47 > ./g [] 6:0-47 + > ./b [8] ./index.js 2:0-47 > ./c [8] ./index.js 3:0-47 - > ./b [8] ./index.js 2:0-47 [1] ./f.js 20 bytes {2} {11} {12} [built] - chunk {3} all/vendors~a~async-a~async-b~b.js (vendors~a~async-a~async-b~b) 20 bytes <{9}> ={0}= ={11}= ={10}= ={1}= ={2}= ={6}= ={8}= >{2}< >{5}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~b) - > ./b b + chunk {3} all/vendors~a~async-a~async-b~b.js (vendors~a~async-a~async-b~b) 20 bytes <{9}> ={0}= ={1}= ={10}= ={11}= ={2}= ={6}= ={8}= >{2}< >{5}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~b) > ./a a - > ./b [8] ./index.js 2:0-47 + > ./b b > ./a [8] ./index.js 1:0-47 + > ./b [8] ./index.js 2:0-47 [3] ./node_modules/y.js 20 bytes {3} [built] - chunk {4} all/vendors~async-c~c.js (vendors~async-c~c) 20 bytes <{9}> ={0}= ={12}= ={1}= ={2}= ={7}= [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-c~c) + chunk {4} all/vendors~async-c~c.js (vendors~async-c~c) 20 bytes <{9}> ={0}= ={1}= ={12}= ={2}= ={7}= [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-c~c) > ./c c > ./c [8] ./index.js 3:0-47 [7] ./node_modules/z.js 20 bytes {4} [built] - chunk {5} all/async-g.js (async-g) 34 bytes <{0}> <{3}> <{1}> <{8}> <{10}> ={2}= [rendered] + chunk {5} all/async-g.js (async-g) 34 bytes <{0}> <{1}> <{10}> <{3}> <{8}> ={2}= [rendered] > ./g [] 6:0-47 > ./g [] 6:0-47 [9] ./g.js 34 bytes {5} [built] - chunk {6} all/async-b.js (async-b) 72 bytes <{9}> ={0}= ={3}= ={1}= ={2}= [rendered] + chunk {6} all/async-b.js (async-b) 72 bytes <{9}> ={0}= ={1}= ={2}= ={3}= [rendered] > ./b [8] ./index.js 2:0-47 [4] ./b.js 72 bytes {6} {11} [built] - chunk {7} all/async-c.js (async-c) 72 bytes <{9}> ={0}= ={4}= ={1}= ={2}= [rendered] + chunk {7} all/async-c.js (async-c) 72 bytes <{9}> ={0}= ={1}= ={2}= ={4}= [rendered] > ./c [8] ./index.js 3:0-47 [5] ./c.js 72 bytes {7} {12} [built] - chunk {8} all/a~async-a.js (a~async-a) 156 bytes <{9}> ={0}= ={3}= ={1}= >{2}< >{5}< [rendered] split chunk (cache group: default) (name: a~async-a) + chunk {8} all/a~async-a.js (a~async-a) 156 bytes <{9}> ={0}= ={1}= ={3}= >{2}< >{5}< [rendered] split chunk (cache group: default) (name: a~async-a) > ./a [8] ./index.js 1:0-47 [6] ./a.js + 1 modules 156 bytes {8} {10} [built] | ./a.js 121 bytes [built] | ./e.js 20 bytes [built] - chunk {9} all/main.js (main) 147 bytes >{0}< >{3}< >{1}< >{2}< >{6}< >{8}< >{4}< >{7}< [entry] [rendered] + chunk {9} all/main.js (main) 147 bytes >{0}< >{1}< >{2}< >{3}< >{4}< >{6}< >{7}< >{8}< [entry] [rendered] > ./ main [8] ./index.js 147 bytes {9} [built] chunk {10} all/a.js (a) 176 bytes ={0}= ={3}= >{2}< >{5}< [entry] [rendered] diff --git a/test/statsCases/async-commons-chunk/expected.txt b/test/statsCases/async-commons-chunk/expected.txt index aecf2fd1c..d67732917 100644 --- a/test/statsCases/async-commons-chunk/expected.txt +++ b/test/statsCases/async-commons-chunk/expected.txt @@ -1,7 +1,7 @@ Entrypoint main = main.js -chunk {0} 0.js 21 bytes <{3}> ={2}= ={1}= [rendered] reused as split chunk (cache group: default) - > [3] ./index.js 2:1-5:3 +chunk {0} 0.js 21 bytes <{3}> ={1}= ={2}= [rendered] reused as split chunk (cache group: default) > [3] ./index.js 17:1-21:3 + > [3] ./index.js 2:1-5:3 > ./a ./b [3] ./index.js 9:1-13:3 [0] ./a.js 21 bytes {0} [built] chunk {1} 1.js 21 bytes <{3}> ={0}= [rendered] diff --git a/test/statsCases/limit-chunk-count-plugin/expected.txt b/test/statsCases/limit-chunk-count-plugin/expected.txt index 8c4fe669f..52cd46d26 100644 --- a/test/statsCases/limit-chunk-count-plugin/expected.txt +++ b/test/statsCases/limit-chunk-count-plugin/expected.txt @@ -21,7 +21,7 @@ Child 2 chunks: 0.bundle.js 912 bytes 0 [emitted] bundle.js 7.14 KiB 1 [emitted] main Entrypoint main = bundle.js - chunk {0} 0.bundle.js 118 bytes <{1}> <{0}> >{0}< [rendered] + chunk {0} 0.bundle.js 118 bytes <{0}> <{1}> >{0}< [rendered] [0] ./d.js 22 bytes {0} [built] [1] ./e.js 22 bytes {0} [built] [2] ./a.js 22 bytes {0} [built] @@ -38,11 +38,11 @@ Child 3 chunks: 1.bundle.js 245 bytes 1 [emitted] bundle.js 7.14 KiB 2 [emitted] main Entrypoint main = bundle.js - chunk {0} 0.bundle.js 74 bytes <{2}> <{0}> >{0}< >{1}< [rendered] + chunk {0} 0.bundle.js 74 bytes <{0}> <{2}> >{0}< >{1}< [rendered] [0] ./d.js 22 bytes {0} [built] [2] ./a.js 22 bytes {0} [built] [4] ./c.js 30 bytes {0} [built] - chunk {1} 1.bundle.js 44 bytes <{2}> <{0}> [rendered] + chunk {1} 1.bundle.js 44 bytes <{0}> <{2}> [rendered] [1] ./e.js 22 bytes {1} [built] [3] ./b.js 22 bytes {1} [built] chunk {2} bundle.js (main) 73 bytes >{0}< >{1}< [entry] [rendered] @@ -57,10 +57,10 @@ Child 4 chunks: 2.bundle.js 603 bytes 2 [emitted] bundle.js 7.14 KiB 3 [emitted] main Entrypoint main = bundle.js - chunk {0} 0.bundle.js 44 bytes <{3}> <{2}> [rendered] + chunk {0} 0.bundle.js 44 bytes <{2}> <{3}> [rendered] [0] ./d.js 22 bytes {0} [built] [2] ./a.js 22 bytes {0} [built] - chunk {1} 1.bundle.js 44 bytes <{3}> <{2}> [rendered] + chunk {1} 1.bundle.js 44 bytes <{2}> <{3}> [rendered] [1] ./e.js 22 bytes {1} [built] [3] ./b.js 22 bytes {1} [built] chunk {2} 2.bundle.js 30 bytes <{3}> >{0}< >{1}< [rendered] diff --git a/test/statsCases/module-deduplication/expected.txt b/test/statsCases/module-deduplication/expected.txt index 3458dfbe2..f9a25238a 100644 --- a/test/statsCases/module-deduplication/expected.txt +++ b/test/statsCases/module-deduplication/expected.txt @@ -11,13 +11,13 @@ e3.js 8.18 KiB 8 [emitted] e3 Entrypoint e1 = e1.js Entrypoint e2 = e2.js Entrypoint e3 = e3.js -chunk {0} 0.js 37 bytes <{8}> <{7}> [rendered] +chunk {0} 0.js 37 bytes <{7}> <{8}> [rendered] [2] ./d.js 9 bytes {0} {6} [built] [5] ./async1.js 28 bytes {0} {5} [built] -chunk {1} 1.js 37 bytes <{8}> <{6}> [rendered] +chunk {1} 1.js 37 bytes <{6}> <{8}> [rendered] [3] ./f.js 9 bytes {1} {7} [built] [6] ./async2.js 28 bytes {1} {4} [built] -chunk {2} 2.js 37 bytes <{7}> <{6}> [rendered] +chunk {2} 2.js 37 bytes <{6}> <{7}> [rendered] [4] ./h.js 9 bytes {2} {8} [built] [7] ./async3.js 28 bytes {2} {3} [built] chunk {3} 3.js 28 bytes <{8}> [rendered] diff --git a/test/statsCases/optimize-chunks/expected.txt b/test/statsCases/optimize-chunks/expected.txt index 633576295..446f4f1c6 100644 --- a/test/statsCases/optimize-chunks/expected.txt +++ b/test/statsCases/optimize-chunks/expected.txt @@ -11,10 +11,10 @@ cir2 from cir1.js 359 bytes 5, 3 [emitted] cir2 from cir1 chunk.js 190 bytes 6, 7 [emitted] chunk ac in ab.js 130 bytes 7 [emitted] ac in ab Entrypoint main = main.js -chunk {0} cir1.js (cir1) 81 bytes <{4}> <{3}> <{5}> >{5}< [rendered] +chunk {0} cir1.js (cir1) 81 bytes <{3}> <{4}> <{5}> >{5}< [rendered] + > [3] ./circular2.js 1:0-79 + > [3] ./circular2.js 1:0-79 > [8] ./index.js 13:0-54 - > [3] ./circular2.js 1:0-79 - > [3] ./circular2.js 1:0-79 [2] ./circular1.js 81 bytes {0} [built] chunk {1} ab.js (ab) 0 bytes <{4}> >{7}< [rendered] > [8] ./index.js 1:0-6:8 diff --git a/test/statsCases/split-chunks-combinations/expected.txt b/test/statsCases/split-chunks-combinations/expected.txt index 74806a51b..cb8306465 100644 --- a/test/statsCases/split-chunks-combinations/expected.txt +++ b/test/statsCases/split-chunks-combinations/expected.txt @@ -1,7 +1,7 @@ Entrypoint main = main.js -chunk {0} async-a~async-b.js (async-a~async-b) 134 bytes <{4}> ={2}= ={1}= [rendered] split chunk (cache group: default) (name: async-a~async-b) - > ./b [5] ./index.js 2:0-47 +chunk {0} async-a~async-b.js (async-a~async-b) 134 bytes <{4}> ={1}= ={2}= [rendered] split chunk (cache group: default) (name: async-a~async-b) > ./a [5] ./index.js 1:0-47 + > ./b [5] ./index.js 2:0-47 [0] ./d.js 67 bytes {0} {3} [built] [1] ./e.js 67 bytes {0} [built] chunk {1} async-a.js (async-a) 48 bytes <{4}> ={0}= [rendered] diff --git a/test/statsCases/split-chunks-issue-6413/expected.txt b/test/statsCases/split-chunks-issue-6413/expected.txt index 5080b9411..0ed29a058 100644 --- a/test/statsCases/split-chunks-issue-6413/expected.txt +++ b/test/statsCases/split-chunks-issue-6413/expected.txt @@ -1,13 +1,13 @@ Entrypoint main = main.js -chunk {0} vendors~async-a~async-b~async-c.js (vendors~async-a~async-b~async-c) 20 bytes <{5}> ={1}= ={4}= ={3}= ={2}= [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b~async-c) - > ./c [5] ./index.js 3:0-47 - > ./b [5] ./index.js 2:0-47 +chunk {0} vendors~async-a~async-b~async-c.js (vendors~async-a~async-b~async-c) 20 bytes <{5}> ={1}= ={2}= ={3}= ={4}= [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b~async-c) > ./a [5] ./index.js 1:0-47 + > ./b [5] ./index.js 2:0-47 + > ./c [5] ./index.js 3:0-47 [1] ./node_modules/x.js 20 bytes {0} [built] -chunk {1} async-a~async-b~async-c.js (async-a~async-b~async-c) 11 bytes <{5}> ={0}= ={4}= ={3}= ={2}= [rendered] split chunk (cache group: default) (name: async-a~async-b~async-c) - > ./c [5] ./index.js 3:0-47 - > ./b [5] ./index.js 2:0-47 +chunk {1} async-a~async-b~async-c.js (async-a~async-b~async-c) 11 bytes <{5}> ={0}= ={2}= ={3}= ={4}= [rendered] split chunk (cache group: default) (name: async-a~async-b~async-c) > ./a [5] ./index.js 1:0-47 + > ./b [5] ./index.js 2:0-47 + > ./c [5] ./index.js 3:0-47 [0] ./common.js 11 bytes {1} [built] chunk {2} async-a.js (async-a) 19 bytes <{5}> ={0}= ={1}= [rendered] > ./a [5] ./index.js 1:0-47 diff --git a/test/statsCases/split-chunks-prefer-bigger-splits/expected.txt b/test/statsCases/split-chunks-prefer-bigger-splits/expected.txt index e2fc34cbf..09548ddd4 100644 --- a/test/statsCases/split-chunks-prefer-bigger-splits/expected.txt +++ b/test/statsCases/split-chunks-prefer-bigger-splits/expected.txt @@ -1,7 +1,7 @@ Entrypoint main = default/main.js -chunk {0} default/async-b~async-c.js (async-b~async-c) 110 bytes <{4}> ={3}= ={2}= [rendered] split chunk (cache group: default) (name: async-b~async-c) - > ./c [6] ./index.js 3:0-47 +chunk {0} default/async-b~async-c.js (async-b~async-c) 110 bytes <{4}> ={2}= ={3}= [rendered] split chunk (cache group: default) (name: async-b~async-c) > ./b [6] ./index.js 2:0-47 + > ./c [6] ./index.js 3:0-47 [0] ./d.js 43 bytes {0} {1} [built] [2] ./f.js 67 bytes {0} [built] chunk {1} default/async-a.js (async-a) 134 bytes <{4}> [rendered] @@ -16,6 +16,6 @@ chunk {2} default/async-b.js (async-b) 105 bytes <{4}> ={0}= [rendered] chunk {3} default/async-c.js (async-c) 48 bytes <{4}> ={0}= [rendered] > ./c [6] ./index.js 3:0-47 [5] ./c.js 48 bytes {3} [built] -chunk {4} default/main.js (main) 147 bytes >{0}< >{2}< >{3}< >{1}< [entry] [rendered] +chunk {4} default/main.js (main) 147 bytes >{0}< >{1}< >{2}< >{3}< [entry] [rendered] > ./ main [6] ./index.js 147 bytes {4} [built] \ No newline at end of file diff --git a/test/statsCases/split-chunks/expected.txt b/test/statsCases/split-chunks/expected.txt index 440b1ac7b..834f44369 100644 --- a/test/statsCases/split-chunks/expected.txt +++ b/test/statsCases/split-chunks/expected.txt @@ -3,45 +3,45 @@ Child default: Entrypoint a = default/a.js Entrypoint b = default/b.js Entrypoint c = default/c.js - chunk {0} default/vendors~async-a~async-b~async-c.js (vendors~async-a~async-b~async-c) 20 bytes <{9}> ={8}= ={1}= ={2}= ={7}= ={3}= ={6}= ={5}= >{2}< >{4}< [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b~async-c) - > ./c [8] ./index.js 3:0-47 - > ./b [8] ./index.js 2:0-47 + chunk {0} default/vendors~async-a~async-b~async-c.js (vendors~async-a~async-b~async-c) 20 bytes <{9}> ={1}= ={2}= ={3}= ={5}= ={6}= ={7}= ={8}= >{2}< >{4}< [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b~async-c) > ./a [8] ./index.js 1:0-47 + > ./b [8] ./index.js 2:0-47 + > ./c [8] ./index.js 3:0-47 [1] ./node_modules/x.js 20 bytes {0} {10} {11} {12} [built] - chunk {1} default/async-a~async-b~async-c.js (async-a~async-b~async-c) 20 bytes <{9}> ={0}= ={8}= ={2}= ={7}= ={3}= ={6}= ={5}= >{2}< >{4}< [rendered] split chunk (cache group: default) (name: async-a~async-b~async-c) - > ./c [8] ./index.js 3:0-47 - > ./b [8] ./index.js 2:0-47 + chunk {1} default/async-a~async-b~async-c.js (async-a~async-b~async-c) 20 bytes <{9}> ={0}= ={2}= ={3}= ={5}= ={6}= ={7}= ={8}= >{2}< >{4}< [rendered] split chunk (cache group: default) (name: async-a~async-b~async-c) > ./a [8] ./index.js 1:0-47 + > ./b [8] ./index.js 2:0-47 + > ./c [8] ./index.js 3:0-47 [0] ./d.js 20 bytes {1} {10} {11} {12} [built] - chunk {2} default/async-b~async-c~async-g.js (async-b~async-c~async-g) 20 bytes <{0}> <{3}> <{1}> <{5}> <{10}> <{9}> ={4}= ={0}= ={8}= ={1}= ={7}= ={3}= ={6}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g) + chunk {2} default/async-b~async-c~async-g.js (async-b~async-c~async-g) 20 bytes <{0}> <{1}> <{10}> <{3}> <{5}> <{9}> ={0}= ={1}= ={3}= ={4}= ={6}= ={7}= ={8}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g) > ./g [] 6:0-47 > ./g [] 6:0-47 + > ./b [8] ./index.js 2:0-47 > ./c [8] ./index.js 3:0-47 - > ./b [8] ./index.js 2:0-47 [2] ./f.js 20 bytes {2} {11} {12} [built] - chunk {3} default/vendors~async-a~async-b.js (vendors~async-a~async-b) 20 bytes <{9}> ={0}= ={1}= ={2}= ={6}= ={5}= >{2}< >{4}< [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b) - > ./b [8] ./index.js 2:0-47 + chunk {3} default/vendors~async-a~async-b.js (vendors~async-a~async-b) 20 bytes <{9}> ={0}= ={1}= ={2}= ={5}= ={6}= >{2}< >{4}< [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b) > ./a [8] ./index.js 1:0-47 + > ./b [8] ./index.js 2:0-47 [3] ./node_modules/y.js 20 bytes {3} {10} {11} [built] - chunk {4} default/async-g.js (async-g) 34 bytes <{0}> <{3}> <{1}> <{5}> <{10}> ={2}= [rendered] + chunk {4} default/async-g.js (async-g) 34 bytes <{0}> <{1}> <{10}> <{3}> <{5}> ={2}= [rendered] > ./g [] 6:0-47 > ./g [] 6:0-47 [9] ./g.js 34 bytes {4} [built] - chunk {5} default/async-a.js (async-a) 156 bytes <{9}> ={0}= ={3}= ={1}= >{2}< >{4}< [rendered] + chunk {5} default/async-a.js (async-a) 156 bytes <{9}> ={0}= ={1}= ={3}= >{2}< >{4}< [rendered] > ./a [8] ./index.js 1:0-47 [7] ./a.js + 1 modules 156 bytes {5} {10} [built] | ./a.js 121 bytes [built] | ./e.js 20 bytes [built] - chunk {6} default/async-b.js (async-b) 72 bytes <{9}> ={0}= ={3}= ={1}= ={2}= [rendered] + chunk {6} default/async-b.js (async-b) 72 bytes <{9}> ={0}= ={1}= ={2}= ={3}= [rendered] > ./b [8] ./index.js 2:0-47 [5] ./b.js 72 bytes {6} {11} [built] - chunk {7} default/async-c.js (async-c) 72 bytes <{9}> ={0}= ={8}= ={1}= ={2}= [rendered] + chunk {7} default/async-c.js (async-c) 72 bytes <{9}> ={0}= ={1}= ={2}= ={8}= [rendered] > ./c [8] ./index.js 3:0-47 [6] ./c.js 72 bytes {7} {12} [built] chunk {8} default/vendors~async-c.js (vendors~async-c) 20 bytes <{9}> ={0}= ={1}= ={2}= ={7}= [rendered] split chunk (cache group: vendors) (name: vendors~async-c) > ./c [8] ./index.js 3:0-47 [4] ./node_modules/z.js 20 bytes {8} {12} [built] - chunk {9} default/main.js (main) 147 bytes >{0}< >{3}< >{1}< >{2}< >{6}< >{5}< >{8}< >{7}< [entry] [rendered] + chunk {9} default/main.js (main) 147 bytes >{0}< >{1}< >{2}< >{3}< >{5}< >{6}< >{7}< >{8}< [entry] [rendered] > ./ main [8] ./index.js 147 bytes {9} [built] chunk {10} default/a.js (a) 216 bytes >{2}< >{4}< [entry] [rendered] @@ -71,51 +71,51 @@ Child all-chunks: Entrypoint a = default/vendors~a~async-a~async-b~async-c~b~c.js default/vendors~a~async-a~async-b~b.js default/a.js Entrypoint b = default/vendors~a~async-a~async-b~async-c~b~c.js default/vendors~a~async-a~async-b~b.js default/b.js Entrypoint c = default/vendors~a~async-a~async-b~async-c~b~c.js default/vendors~async-c~c.js default/c.js - chunk {0} default/vendors~a~async-a~async-b~async-c~b~c.js (vendors~a~async-a~async-b~async-c~b~c) 20 bytes <{9}> ={4}= ={12}= ={3}= ={11}= ={10}= ={1}= ={2}= ={7}= ={6}= ={8}= >{2}< >{5}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~async-c~b~c) + chunk {0} default/vendors~a~async-a~async-b~async-c~b~c.js (vendors~a~async-a~async-b~async-c~b~c) 20 bytes <{9}> ={1}= ={10}= ={11}= ={12}= ={2}= ={3}= ={4}= ={6}= ={7}= ={8}= >{2}< >{5}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~async-c~b~c) + > ./a a + > ./b b > ./c c - > ./b b - > ./a a - > ./c [8] ./index.js 3:0-47 - > ./b [8] ./index.js 2:0-47 > ./a [8] ./index.js 1:0-47 + > ./b [8] ./index.js 2:0-47 + > ./c [8] ./index.js 3:0-47 [2] ./node_modules/x.js 20 bytes {0} [built] - chunk {1} default/a~async-a~async-b~async-c~b~c.js (a~async-a~async-b~async-c~b~c) 20 bytes <{9}> ={0}= ={4}= ={2}= ={7}= ={3}= ={6}= ={8}= >{2}< >{5}< [rendered] split chunk (cache group: default) (name: a~async-a~async-b~async-c~b~c) - > ./c [8] ./index.js 3:0-47 - > ./b [8] ./index.js 2:0-47 + chunk {1} default/a~async-a~async-b~async-c~b~c.js (a~async-a~async-b~async-c~b~c) 20 bytes <{9}> ={0}= ={2}= ={3}= ={4}= ={6}= ={7}= ={8}= >{2}< >{5}< [rendered] split chunk (cache group: default) (name: a~async-a~async-b~async-c~b~c) > ./a [8] ./index.js 1:0-47 + > ./b [8] ./index.js 2:0-47 + > ./c [8] ./index.js 3:0-47 [0] ./d.js 20 bytes {1} {10} {11} {12} [built] - chunk {2} default/async-b~async-c~async-g~b~c.js (async-b~async-c~async-g~b~c) 20 bytes <{0}> <{3}> <{1}> <{8}> <{10}> <{9}> ={5}= ={0}= ={4}= ={1}= ={7}= ={3}= ={6}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g~b~c) + chunk {2} default/async-b~async-c~async-g~b~c.js (async-b~async-c~async-g~b~c) 20 bytes <{0}> <{1}> <{10}> <{3}> <{8}> <{9}> ={0}= ={1}= ={3}= ={4}= ={5}= ={6}= ={7}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g~b~c) > ./g [] 6:0-47 > ./g [] 6:0-47 + > ./b [8] ./index.js 2:0-47 > ./c [8] ./index.js 3:0-47 - > ./b [8] ./index.js 2:0-47 [1] ./f.js 20 bytes {2} {11} {12} [built] - chunk {3} default/vendors~a~async-a~async-b~b.js (vendors~a~async-a~async-b~b) 20 bytes <{9}> ={0}= ={11}= ={10}= ={1}= ={2}= ={6}= ={8}= >{2}< >{5}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~b) - > ./b b + chunk {3} default/vendors~a~async-a~async-b~b.js (vendors~a~async-a~async-b~b) 20 bytes <{9}> ={0}= ={1}= ={10}= ={11}= ={2}= ={6}= ={8}= >{2}< >{5}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~b) > ./a a - > ./b [8] ./index.js 2:0-47 + > ./b b > ./a [8] ./index.js 1:0-47 + > ./b [8] ./index.js 2:0-47 [3] ./node_modules/y.js 20 bytes {3} [built] - chunk {4} default/vendors~async-c~c.js (vendors~async-c~c) 20 bytes <{9}> ={0}= ={12}= ={1}= ={2}= ={7}= [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-c~c) + chunk {4} default/vendors~async-c~c.js (vendors~async-c~c) 20 bytes <{9}> ={0}= ={1}= ={12}= ={2}= ={7}= [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-c~c) > ./c c > ./c [8] ./index.js 3:0-47 [7] ./node_modules/z.js 20 bytes {4} [built] - chunk {5} default/async-g.js (async-g) 34 bytes <{0}> <{3}> <{1}> <{8}> <{10}> ={2}= [rendered] + chunk {5} default/async-g.js (async-g) 34 bytes <{0}> <{1}> <{10}> <{3}> <{8}> ={2}= [rendered] > ./g [] 6:0-47 > ./g [] 6:0-47 [9] ./g.js 34 bytes {5} [built] - chunk {6} default/async-b.js (async-b) 72 bytes <{9}> ={0}= ={3}= ={1}= ={2}= [rendered] + chunk {6} default/async-b.js (async-b) 72 bytes <{9}> ={0}= ={1}= ={2}= ={3}= [rendered] > ./b [8] ./index.js 2:0-47 [4] ./b.js 72 bytes {6} {11} [built] - chunk {7} default/async-c.js (async-c) 72 bytes <{9}> ={0}= ={4}= ={1}= ={2}= [rendered] + chunk {7} default/async-c.js (async-c) 72 bytes <{9}> ={0}= ={1}= ={2}= ={4}= [rendered] > ./c [8] ./index.js 3:0-47 [5] ./c.js 72 bytes {7} {12} [built] - chunk {8} default/a~async-a.js (a~async-a) 156 bytes <{9}> ={0}= ={3}= ={1}= >{2}< >{5}< [rendered] split chunk (cache group: default) (name: a~async-a) + chunk {8} default/a~async-a.js (a~async-a) 156 bytes <{9}> ={0}= ={1}= ={3}= >{2}< >{5}< [rendered] split chunk (cache group: default) (name: a~async-a) > ./a [8] ./index.js 1:0-47 [6] ./a.js + 1 modules 156 bytes {8} {10} [built] | ./a.js 121 bytes [built] | ./e.js 20 bytes [built] - chunk {9} default/main.js (main) 147 bytes >{0}< >{3}< >{1}< >{2}< >{6}< >{8}< >{4}< >{7}< [entry] [rendered] + chunk {9} default/main.js (main) 147 bytes >{0}< >{1}< >{2}< >{3}< >{4}< >{6}< >{7}< >{8}< [entry] [rendered] > ./ main [8] ./index.js 147 bytes {9} [built] chunk {10} default/a.js (a) 176 bytes ={0}= ={3}= >{2}< >{5}< [entry] [rendered] @@ -139,13 +139,13 @@ Child manual: Entrypoint a = default/vendors.js default/a.js Entrypoint b = default/vendors.js default/b.js Entrypoint c = default/vendors.js default/c.js - chunk {0} default/vendors.js (vendors) 112 bytes <{5}> ={8}= ={7}= ={6}= ={4}= ={3}= ={2}= >{1}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors) - > ./c c - > ./b b + chunk {0} default/vendors.js (vendors) 112 bytes <{5}> ={2}= ={3}= ={4}= ={6}= ={7}= ={8}= >{1}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors) > ./a a - > ./c [8] ./index.js 3:0-47 - > ./b [8] ./index.js 2:0-47 + > ./b b + > ./c c > ./a [8] ./index.js 1:0-47 + > ./b [8] ./index.js 2:0-47 + > ./c [8] ./index.js 3:0-47 [2] ./node_modules/x.js 20 bytes {0} [built] [3] ./node_modules/y.js 20 bytes {0} [built] [6] ./node_modules/z.js 20 bytes {0} [built] @@ -195,51 +195,51 @@ Child name-too-long: Entrypoint aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa = vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~716093be.js vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.js aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.js Entrypoint bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb = vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~716093be.js vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.js bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.js Entrypoint cccccccccccccccccccccccccccccc = vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~716093be.js vendors~async-c~cccccccccccccccccccccccccccccc.js cccccccccccccccccccccccccccccc.js - chunk {0} vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~716093be.js (vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~716093be) 20 bytes <{9}> ={4}= ={12}= ={3}= ={11}= ={10}= ={1}= ={2}= ={7}= ={6}= ={8}= >{2}< >{5}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~716093be) + chunk {0} vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~716093be.js (vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~716093be) 20 bytes <{9}> ={1}= ={10}= ={11}= ={12}= ={2}= ={3}= ={4}= ={6}= ={7}= ={8}= >{2}< >{5}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~716093be) + > ./a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + > ./b bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb > ./c cccccccccccccccccccccccccccccc - > ./b bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb - > ./a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - > ./c [8] ./index.js 3:0-47 - > ./b [8] ./index.js 2:0-47 > ./a [8] ./index.js 1:0-47 + > ./b [8] ./index.js 2:0-47 + > ./c [8] ./index.js 3:0-47 [2] ./node_modules/x.js 20 bytes {0} [built] - chunk {1} aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccc~e7d53185.js (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccc~e7d53185) 20 bytes <{9}> ={0}= ={4}= ={2}= ={7}= ={3}= ={6}= ={8}= >{2}< >{5}< [rendered] split chunk (cache group: default) (name: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccc~e7d53185) - > ./c [8] ./index.js 3:0-47 - > ./b [8] ./index.js 2:0-47 + chunk {1} aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccc~e7d53185.js (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccc~e7d53185) 20 bytes <{9}> ={0}= ={2}= ={3}= ={4}= ={6}= ={7}= ={8}= >{2}< >{5}< [rendered] split chunk (cache group: default) (name: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccc~e7d53185) > ./a [8] ./index.js 1:0-47 + > ./b [8] ./index.js 2:0-47 + > ./c [8] ./index.js 3:0-47 [0] ./d.js 20 bytes {1} {10} {11} {12} [built] - chunk {2} async-b~async-c~async-g~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccccccccccccccccccc.js (async-b~async-c~async-g~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccccccccccccccccccc) 20 bytes <{0}> <{3}> <{1}> <{8}> <{10}> <{9}> ={5}= ={0}= ={4}= ={1}= ={7}= ={3}= ={6}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccccccccccccccccccc) + chunk {2} async-b~async-c~async-g~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccccccccccccccccccc.js (async-b~async-c~async-g~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccccccccccccccccccc) 20 bytes <{0}> <{1}> <{10}> <{3}> <{8}> <{9}> ={0}= ={1}= ={3}= ={4}= ={5}= ={6}= ={7}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccccccccccccccccccc) > ./g [] 6:0-47 > ./g [] 6:0-47 + > ./b [8] ./index.js 2:0-47 > ./c [8] ./index.js 3:0-47 - > ./b [8] ./index.js 2:0-47 [1] ./f.js 20 bytes {2} {11} {12} [built] - chunk {3} vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.js (vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb) 20 bytes <{9}> ={0}= ={11}= ={10}= ={1}= ={2}= ={6}= ={8}= >{2}< >{5}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb) - > ./b bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb + chunk {3} vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.js (vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb) 20 bytes <{9}> ={0}= ={1}= ={10}= ={11}= ={2}= ={6}= ={8}= >{2}< >{5}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb) > ./a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - > ./b [8] ./index.js 2:0-47 + > ./b bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb > ./a [8] ./index.js 1:0-47 + > ./b [8] ./index.js 2:0-47 [3] ./node_modules/y.js 20 bytes {3} [built] - chunk {4} vendors~async-c~cccccccccccccccccccccccccccccc.js (vendors~async-c~cccccccccccccccccccccccccccccc) 20 bytes <{9}> ={0}= ={12}= ={1}= ={2}= ={7}= [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-c~cccccccccccccccccccccccccccccc) + chunk {4} vendors~async-c~cccccccccccccccccccccccccccccc.js (vendors~async-c~cccccccccccccccccccccccccccccc) 20 bytes <{9}> ={0}= ={1}= ={12}= ={2}= ={7}= [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-c~cccccccccccccccccccccccccccccc) > ./c cccccccccccccccccccccccccccccc > ./c [8] ./index.js 3:0-47 [7] ./node_modules/z.js 20 bytes {4} [built] - chunk {5} async-g.js (async-g) 34 bytes <{0}> <{3}> <{1}> <{8}> <{10}> ={2}= [rendered] + chunk {5} async-g.js (async-g) 34 bytes <{0}> <{1}> <{10}> <{3}> <{8}> ={2}= [rendered] > ./g [] 6:0-47 > ./g [] 6:0-47 [9] ./g.js 34 bytes {5} [built] - chunk {6} async-b.js (async-b) 72 bytes <{9}> ={0}= ={3}= ={1}= ={2}= [rendered] + chunk {6} async-b.js (async-b) 72 bytes <{9}> ={0}= ={1}= ={2}= ={3}= [rendered] > ./b [8] ./index.js 2:0-47 [4] ./b.js 72 bytes {6} {11} [built] - chunk {7} async-c.js (async-c) 72 bytes <{9}> ={0}= ={4}= ={1}= ={2}= [rendered] + chunk {7} async-c.js (async-c) 72 bytes <{9}> ={0}= ={1}= ={2}= ={4}= [rendered] > ./c [8] ./index.js 3:0-47 [5] ./c.js 72 bytes {7} {12} [built] - chunk {8} aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a.js (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a) 156 bytes <{9}> ={0}= ={3}= ={1}= >{2}< >{5}< [rendered] split chunk (cache group: default) (name: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a) + chunk {8} aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a.js (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a) 156 bytes <{9}> ={0}= ={1}= ={3}= >{2}< >{5}< [rendered] split chunk (cache group: default) (name: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a) > ./a [8] ./index.js 1:0-47 [6] ./a.js + 1 modules 156 bytes {8} {10} [built] | ./a.js 121 bytes [built] | ./e.js 20 bytes [built] - chunk {9} main.js (main) 147 bytes >{0}< >{3}< >{1}< >{2}< >{6}< >{8}< >{4}< >{7}< [entry] [rendered] + chunk {9} main.js (main) 147 bytes >{0}< >{1}< >{2}< >{3}< >{4}< >{6}< >{7}< >{8}< [entry] [rendered] > ./ main [8] ./index.js 147 bytes {9} [built] chunk {10} aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.js (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) 176 bytes ={0}= ={3}= >{2}< >{5}< [entry] [rendered] From cc0d29a90e9b06e21f6620cf909bebb87644b1d2 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Sat, 17 Feb 2018 09:53:01 +0100 Subject: [PATCH 086/112] update test case to be more complex --- .../statsCases/split-chunks-combinations/a.js | 4 +- .../statsCases/split-chunks-combinations/b.js | 4 +- .../statsCases/split-chunks-combinations/c.js | 4 +- .../statsCases/split-chunks-combinations/d.js | 3 +- .../statsCases/split-chunks-combinations/e.js | 3 +- .../split-chunks-combinations/expected.txt | 44 +++++++++++++------ .../statsCases/split-chunks-combinations/f.js | 3 +- .../statsCases/split-chunks-combinations/g.js | 2 + .../split-chunks-combinations/index.js | 4 ++ .../webpack.config.js | 1 + .../statsCases/split-chunks-combinations/x.js | 1 + .../statsCases/split-chunks-combinations/y.js | 1 + 12 files changed, 51 insertions(+), 23 deletions(-) create mode 100644 test/statsCases/split-chunks-combinations/g.js create mode 100644 test/statsCases/split-chunks-combinations/x.js create mode 100644 test/statsCases/split-chunks-combinations/y.js diff --git a/test/statsCases/split-chunks-combinations/a.js b/test/statsCases/split-chunks-combinations/a.js index 1ffdae326..48f084688 100644 --- a/test/statsCases/split-chunks-combinations/a.js +++ b/test/statsCases/split-chunks-combinations/a.js @@ -1,3 +1,3 @@ -import "./d"; -import "./e"; +import "./x"; +import "./y"; export default "a"; diff --git a/test/statsCases/split-chunks-combinations/b.js b/test/statsCases/split-chunks-combinations/b.js index aa63bb2f0..4a7438a20 100644 --- a/test/statsCases/split-chunks-combinations/b.js +++ b/test/statsCases/split-chunks-combinations/b.js @@ -1,3 +1,3 @@ -import "./d"; -import "./e"; +import "./x"; +import "./y"; export default "b"; diff --git a/test/statsCases/split-chunks-combinations/c.js b/test/statsCases/split-chunks-combinations/c.js index a88137b62..651fd1cba 100644 --- a/test/statsCases/split-chunks-combinations/c.js +++ b/test/statsCases/split-chunks-combinations/c.js @@ -1,2 +1,2 @@ -import "./d"; -export default "a"; +import "./x"; +export default "c"; diff --git a/test/statsCases/split-chunks-combinations/d.js b/test/statsCases/split-chunks-combinations/d.js index 1f44b439e..9d7e0d4de 100644 --- a/test/statsCases/split-chunks-combinations/d.js +++ b/test/statsCases/split-chunks-combinations/d.js @@ -1 +1,2 @@ -// content content content content content content content content +import "./x"; +export default "d"; diff --git a/test/statsCases/split-chunks-combinations/e.js b/test/statsCases/split-chunks-combinations/e.js index 1f44b439e..4e0e9da3d 100644 --- a/test/statsCases/split-chunks-combinations/e.js +++ b/test/statsCases/split-chunks-combinations/e.js @@ -1 +1,2 @@ -// content content content content content content content content +import "./x"; +export default "e"; diff --git a/test/statsCases/split-chunks-combinations/expected.txt b/test/statsCases/split-chunks-combinations/expected.txt index cb8306465..1ebfc3cc9 100644 --- a/test/statsCases/split-chunks-combinations/expected.txt +++ b/test/statsCases/split-chunks-combinations/expected.txt @@ -1,19 +1,35 @@ Entrypoint main = main.js -chunk {0} async-a~async-b.js (async-a~async-b) 134 bytes <{4}> ={1}= ={2}= [rendered] split chunk (cache group: default) (name: async-a~async-b) - > ./a [5] ./index.js 1:0-47 - > ./b [5] ./index.js 2:0-47 - [0] ./d.js 67 bytes {0} {3} [built] - [1] ./e.js 67 bytes {0} [built] -chunk {1} async-a.js (async-a) 48 bytes <{4}> ={0}= [rendered] - > ./a [5] ./index.js 1:0-47 +chunk {0} async-a~async-b.js (async-a~async-b) 134 bytes <{8}> ={1}= ={2}= [rendered] split chunk (cache group: default) (name: async-a~async-b) + > ./a [9] ./index.js 1:0-47 + > ./b [9] ./index.js 2:0-47 + [0] ./x.js 67 bytes {0} {3} {4} {5} {6} {7} [built] + [1] ./y.js 67 bytes {0} [built] +chunk {1} async-a.js (async-a) 48 bytes <{8}> ={0}= [rendered] + > ./a [9] ./index.js 1:0-47 [2] ./a.js 48 bytes {1} [built] -chunk {2} async-b.js (async-b) 48 bytes <{4}> ={0}= [rendered] - > ./b [5] ./index.js 2:0-47 +chunk {2} async-b.js (async-b) 48 bytes <{8}> ={0}= [rendered] + > ./b [9] ./index.js 2:0-47 [3] ./b.js 48 bytes {2} [built] -chunk {3} async-c.js (async-c) 101 bytes <{4}> [rendered] - > ./c [5] ./index.js 3:0-47 - [0] ./d.js 67 bytes {0} {3} [built] +chunk {3} async-c.js (async-c) 101 bytes <{8}> [rendered] + > ./c [9] ./index.js 3:0-47 + [0] ./x.js 67 bytes {0} {3} {4} {5} {6} {7} [built] [4] ./c.js 34 bytes {3} [built] -chunk {4} main.js (main) 147 bytes >{0}< >{1}< >{2}< >{3}< [entry] [rendered] +chunk {4} async-d.js (async-d) 101 bytes <{8}> [rendered] + > ./d [9] ./index.js 4:0-47 + [0] ./x.js 67 bytes {0} {3} {4} {5} {6} {7} [built] + [5] ./d.js 34 bytes {4} [built] +chunk {5} async-e.js (async-e) 101 bytes <{8}> [rendered] + > ./e [9] ./index.js 5:0-47 + [0] ./x.js 67 bytes {0} {3} {4} {5} {6} {7} [built] + [6] ./e.js 34 bytes {5} [built] +chunk {6} async-f.js (async-f) 101 bytes <{8}> [rendered] + > ./f [9] ./index.js 6:0-47 + [0] ./x.js 67 bytes {0} {3} {4} {5} {6} {7} [built] + [7] ./f.js 34 bytes {6} [built] +chunk {7} async-g.js (async-g) 101 bytes <{8}> [rendered] + > ./g [9] ./index.js 7:0-47 + [0] ./x.js 67 bytes {0} {3} {4} {5} {6} {7} [built] + [8] ./g.js 34 bytes {7} [built] +chunk {8} main.js (main) 343 bytes >{0}< >{1}< >{2}< >{3}< >{4}< >{5}< >{6}< >{7}< [entry] [rendered] > ./ main - [5] ./index.js 147 bytes {4} [built] \ No newline at end of file + [9] ./index.js 343 bytes {8} [built] \ No newline at end of file diff --git a/test/statsCases/split-chunks-combinations/f.js b/test/statsCases/split-chunks-combinations/f.js index 531ff10e5..e497c6df3 100644 --- a/test/statsCases/split-chunks-combinations/f.js +++ b/test/statsCases/split-chunks-combinations/f.js @@ -1 +1,2 @@ -// content content content content content +import "./x"; +export default "f"; diff --git a/test/statsCases/split-chunks-combinations/g.js b/test/statsCases/split-chunks-combinations/g.js new file mode 100644 index 000000000..4c9e17ae7 --- /dev/null +++ b/test/statsCases/split-chunks-combinations/g.js @@ -0,0 +1,2 @@ +import "./x"; +export default "g"; diff --git a/test/statsCases/split-chunks-combinations/index.js b/test/statsCases/split-chunks-combinations/index.js index 5dfec91bc..e3303204f 100644 --- a/test/statsCases/split-chunks-combinations/index.js +++ b/test/statsCases/split-chunks-combinations/index.js @@ -1,3 +1,7 @@ import(/* webpackChunkName: "async-a" */ "./a"); import(/* webpackChunkName: "async-b" */ "./b"); import(/* webpackChunkName: "async-c" */ "./c"); +import(/* webpackChunkName: "async-d" */ "./d"); +import(/* webpackChunkName: "async-e" */ "./e"); +import(/* webpackChunkName: "async-f" */ "./f"); +import(/* webpackChunkName: "async-g" */ "./g"); diff --git a/test/statsCases/split-chunks-combinations/webpack.config.js b/test/statsCases/split-chunks-combinations/webpack.config.js index 536c5f125..a046c50ff 100644 --- a/test/statsCases/split-chunks-combinations/webpack.config.js +++ b/test/statsCases/split-chunks-combinations/webpack.config.js @@ -18,6 +18,7 @@ module.exports = { }, optimization: { splitChunks: { + maxComplexity: 100, minSize: 100 } }, diff --git a/test/statsCases/split-chunks-combinations/x.js b/test/statsCases/split-chunks-combinations/x.js new file mode 100644 index 000000000..1f44b439e --- /dev/null +++ b/test/statsCases/split-chunks-combinations/x.js @@ -0,0 +1 @@ +// content content content content content content content content diff --git a/test/statsCases/split-chunks-combinations/y.js b/test/statsCases/split-chunks-combinations/y.js new file mode 100644 index 000000000..1f44b439e --- /dev/null +++ b/test/statsCases/split-chunks-combinations/y.js @@ -0,0 +1 @@ +// content content content content content content content content From 244d27a42daccea5e4e211374c111109e18f1059 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Sat, 17 Feb 2018 09:48:40 +0100 Subject: [PATCH 087/112] improve way of getting combinations of chunks we no longer require a complexity limit -> maxComplexity removed --- lib/WebpackOptionsDefaulter.js | 1 - lib/optimize/SplitChunksPlugin.js | 54 ++++++++++--------- lib/util/SetHelpers.js | 8 +++ schemas/WebpackOptions.json | 5 -- .../webpack.config.js | 1 - 5 files changed, 36 insertions(+), 33 deletions(-) diff --git a/lib/WebpackOptionsDefaulter.js b/lib/WebpackOptionsDefaulter.js index 487fe2f3c..a3b5ee65a 100644 --- a/lib/WebpackOptionsDefaulter.js +++ b/lib/WebpackOptionsDefaulter.js @@ -168,7 +168,6 @@ class WebpackOptionsDefaulter extends OptionsDefaulter { this.set("optimization.usedExports", "make", options => isProductionLikeMode(options)); this.set("optimization.concatenateModules", "make", options => isProductionLikeMode(options)); this.set("optimization.splitChunks", {}); - this.set("optimization.splitChunks.maxComplexity", "make", options => isProductionLikeMode(options) ? 3 : 1); this.set("optimization.splitChunks.chunks", "async"); this.set("optimization.splitChunks.minSize", 30000); this.set("optimization.splitChunks.minChunks", 1); diff --git a/lib/optimize/SplitChunksPlugin.js b/lib/optimize/SplitChunksPlugin.js index d5b59b842..90264ca13 100644 --- a/lib/optimize/SplitChunksPlugin.js +++ b/lib/optimize/SplitChunksPlugin.js @@ -7,6 +7,7 @@ const crypto = require("crypto"); const SortableSet = require("../util/SortableSet"); const GraphHelpers = require("../GraphHelpers"); +const isSubset = require("../util/SetHelpers").isSubset; const hashFilename = (name) => { return crypto.createHash("md5").update(name).digest("hex").slice(0, 8); @@ -40,23 +41,6 @@ const isOverlap = (a, b) => { return false; }; -const getCombinations = (array, maxDepth) => { - const results = []; - getCombinationsInteral(array, maxDepth, results); - return results; -}; - -const getCombinationsInteral = (array, maxDepth, results) => { - results.push(array); - if(maxDepth === 0 || array.length === 1) { - return; - } - for(let i = 0; i < array.length; i++) { - const newArray = array.slice(0, i).concat(array.slice(i + 1, array.length)); - getCombinationsInteral(newArray, maxDepth - 1, results); - } -}; - const compareEntries = (a, b) => { // 1. by priority const diffPriority = a.cacheGroup.priority - b.cacheGroup.priority; @@ -97,7 +81,6 @@ module.exports = class SplitChunksPlugin { static normalizeOptions(options) { return { - maxComplexity: options.maxComplexity || 0, chunks: options.chunks || "all", minSize: options.minSize || 0, minChunks: options.minChunks || 1, @@ -227,6 +210,25 @@ module.exports = class SplitChunksPlugin { for(const chunk of chunks) { indexMap.set(chunk, index++); } + const getKey = chunks => { + return Array.from(chunks, c => indexMap.get(c)).sort().join(); + }; + // Create a list of possible combinations + const chunkSetsInGraph = new Map(); // Map> + for(const module of compilation.modules) { + const chunkIndices = getKey(module.chunksIterable); + chunkSetsInGraph.set(chunkIndices, new Set(module.chunksIterable)); + } + const combinations = new Map(); // Map[]> + for(const [key, chunksSet] of chunkSetsInGraph) { + var array = []; + for(const set of chunkSetsInGraph.values()) { + if(isSubset(chunksSet, set)) { + array.push(set); + } + } + combinations.set(key, array); + } // Map a list of chunks to a list of modules // For the key the chunk "index" is used, the value is a SortableSet of modules const chunksInfoMap = new Map(); @@ -249,24 +251,24 @@ module.exports = class SplitChunksPlugin { getName: cacheGroupSource.getName !== undefined ? cacheGroupSource.getName : this.options.getName, reuseExistingChunk: cacheGroupSource.reuseExistingChunk }; - // Select chunks by configuration - const maxSelectedChunks = cacheGroup.chunks === "initial" ? chunks.filter(chunk => chunk.canBeInitial()) : - cacheGroup.chunks === "async" ? chunks.filter(chunk => !chunk.canBeInitial()) : - chunks; - // For all (nearly all) combination of chunk selection - for(const selectedChunks of getCombinations(maxSelectedChunks, this.options.maxComplexity)) { + // For all combination of chunk selection + for(const chunkCombination of combinations.get(getKey(chunks))) { // Get indices of chunks in which this module occurs - const chunkIndices = selectedChunks.map(chunk => indexMap.get(chunk)); + const chunkIndices = Array.from(chunkCombination, chunk => indexMap.get(chunk)); // Break if minimum number of chunks is not reached if(chunkIndices.length < cacheGroup.minChunks) continue; + // Select chunks by configuration + const selectedChunks = cacheGroup.chunks === "initial" ? Array.from(chunkCombination).filter(chunk => chunk.canBeInitial()) : + cacheGroup.chunks === "async" ? Array.from(chunkCombination).filter(chunk => !chunk.canBeInitial()) : + Array.from(chunkCombination); // Determine name for split chunk const name = cacheGroup.getName(module, selectedChunks, cacheGroup.key); // Create key for maps // When it has a name we use the name as key // Elsewise we create the key from chunks and cache group key // This automatically merges equal names - const chunksKey = chunkIndices.sort().join(); + const chunksKey = getKey(selectedChunks); const key = name && `name:${name}` || `chunks:${chunksKey} key:${cacheGroup.key}`; // Add module to maps diff --git a/lib/util/SetHelpers.js b/lib/util/SetHelpers.js index 2a6da2b67..d134a6fd2 100644 --- a/lib/util/SetHelpers.js +++ b/lib/util/SetHelpers.js @@ -24,3 +24,11 @@ exports.intersect = sets => { } return current; }; + +exports.isSubset = (bigSet, smallSet) => { + if(bigSet.size < smallSet.size) return false; + for(const item of smallSet) { + if(!bigSet.has(item)) return false; + } + return true; +}; diff --git a/schemas/WebpackOptions.json b/schemas/WebpackOptions.json index 57383a94e..93969552e 100644 --- a/schemas/WebpackOptions.json +++ b/schemas/WebpackOptions.json @@ -1335,11 +1335,6 @@ "type": "object", "additionalProperties": false, "properties": { - "maxComplexity": { - "description": "Limits the algorithmic complexity", - "type": "number", - "minimum": 0 - }, "chunks": { "description": "Select chunks for determining shared modules (defaults to \"async\", \"initial\" and \"all\" requires adding these chunks to the HTML)", "enum": [ diff --git a/test/statsCases/split-chunks-combinations/webpack.config.js b/test/statsCases/split-chunks-combinations/webpack.config.js index a046c50ff..536c5f125 100644 --- a/test/statsCases/split-chunks-combinations/webpack.config.js +++ b/test/statsCases/split-chunks-combinations/webpack.config.js @@ -18,7 +18,6 @@ module.exports = { }, optimization: { splitChunks: { - maxComplexity: 100, minSize: 100 } }, From c2e61320d3443b743397094262c70da25073c4ed Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Sat, 17 Feb 2018 10:24:34 +0100 Subject: [PATCH 088/112] Use non-parallel minimizer for testing to make CI more stable --- test/TestCases.test.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/test/TestCases.test.js b/test/TestCases.test.js index a0d1ee450..a74c3557e 100644 --- a/test/TestCases.test.js +++ b/test/TestCases.test.js @@ -7,11 +7,18 @@ const fs = require("fs"); const vm = require("vm"); const mkdirp = require("mkdirp"); const Test = require("mocha/lib/test"); +const UglifyJsPlugin = require("uglifyjs-webpack-plugin"); const checkArrayExpectation = require("./checkArrayExpectation"); const Stats = require("../lib/Stats"); const webpack = require("../lib/webpack"); +const uglifyJsForTesting = new UglifyJsPlugin({ + cache: false, + parallel: false, + sourceMap: true +}); + const DEFAULT_OPTIMIZATIONS = { removeAvailableModules: true, removeEmptyChunks: true, @@ -24,10 +31,16 @@ const DEFAULT_OPTIMIZATIONS = { noEmitOnErrors: false, concatenateModules: false, namedModules: false, + minimizer: [ + uglifyJsForTesting + ] }; const NO_EMIT_ON_ERRORS_OPTIMIZATIONS = { - noEmitOnErrors: false + noEmitOnErrors: false, + minimizer: [ + uglifyJsForTesting + ] }; describe("TestCases", () => { From 735c8ce9e0e4729ce6aa9eb55be3731ab82b5f3d Mon Sep 17 00:00:00 2001 From: EugeneHlushko Date: Sat, 17 Feb 2018 13:09:35 +0200 Subject: [PATCH 089/112] refactor(es6): multiline string, arr.includes, arrow functions in ./lib and ./benchmark --- benchmark/benchmark.js | 76 +++++++++++++++--------------- benchmark/createFixtures.js | 29 +++++++----- lib/CachePlugin.js | 24 +++++----- lib/CaseSensitiveModulesWarning.js | 8 ++-- lib/Chunk.js | 10 ++-- test/CachePlugin.unittest.js | 8 ++-- 6 files changed, 82 insertions(+), 73 deletions(-) diff --git a/benchmark/benchmark.js b/benchmark/benchmark.js index 49240b4c1..03adf58a4 100644 --- a/benchmark/benchmark.js +++ b/benchmark/benchmark.js @@ -15,7 +15,7 @@ const benchmarkOptions = { function runTimes(compiler, times, deferred) { fs.writeFileSync(path.join(fixtures, "0.js"), "module.exports = " + Math.random(), "utf-8"); - compiler.run((err, stats) => { + compiler.run(err => { if(err) throw err; if(times === 1) deferred.resolve(); @@ -30,12 +30,12 @@ const tests = { (size, deferred) => { webpack({ context: fixtures, - entry: "./" + size + ".js", + entry: `./${size}.js`, output: { path: outputPath, filename: "bundle.js" } - }, (err, stats) => { + }, err => { if(err) throw err; deferred.resolve(); }); @@ -46,16 +46,16 @@ const tests = { (size, deferred) => { webpack({ context: fixtures, - entry: "./" + size + ".big.js", + entry: `./${size}.big.js`, output: { path: outputPath, filename: "bundle.js" }, devtool: "eval" - }, (err, stats) => { + }, err => { if(err) throw err; deferred.resolve(); - }) + }); } ], "sourcemap build": [ @@ -63,16 +63,16 @@ const tests = { (size, deferred) => { webpack({ context: fixtures, - entry: "./" + size + ".big.js", + entry: `./${size}.big.js`, output: { path: outputPath, filename: "bundle.js" }, devtool: "source-map" - }, (err, stats) => { + }, err => { if(err) throw err; deferred.resolve(); - }) + }); } ], "cheap sourcemap build": [ @@ -80,16 +80,32 @@ const tests = { (size, deferred) => { webpack({ context: fixtures, - entry: "./" + size + ".big.js", + entry: `./${size}.big.js`, output: { path: outputPath, filename: "bundle.js" }, devtool: "cheap-source-map" - }, function(err, stats) { + }, err => { if(err) throw err; deferred.resolve(); - }) + }); + } + ], + "build w/ chunks": [ + [0, 1, 5, 10, 50, 100, 200], + (size, deferred) => { + webpack({ + context: fixtures, + entry: `./${size}.async.js`, + output: { + path: outputPath, + filename: "bundle.js" + } + }, err => { + if(err) throw err; + deferred.resolve(); + }); } ], "build w/ chunks": [ @@ -102,26 +118,10 @@ const tests = { path: outputPath, filename: "bundle.js" } - }, function(err, stats) { + }, err => { if(err) throw err; deferred.resolve(); - }) - } - ], - "build w/ chunks": [ - [0, 1, 5, 10, 50, 100, 200], - (size, deferred) => { - webpack({ - context: fixtures, - entry: "./" + size + ".async.js", - output: { - path: outputPath, - filename: "bundle.js" - } - }, function(err, stats) { - if(err) throw err; - deferred.resolve(); - }) + }); } ], "incremental": [ @@ -161,7 +161,7 @@ const tests = { var compiler = webpack({ cache: true, context: fixtures, - entry: "./" + size + ".js", + entry: `./${size}.js`, output: { path: outputPath, filename: "bundle.js" @@ -176,7 +176,7 @@ const tests = { var compiler = webpack({ cache: true, context: fixtures, - entry: "./" + size + ".js", + entry: `./${size}.js`, output: { path: outputPath, filename: "bundle.js" @@ -191,7 +191,7 @@ const tests = { var compiler = webpack({ cache: true, context: fixtures, - entry: "./" + size + ".js", + entry: `./${size}.js`, output: { path: outputPath, filename: "bundle.js" @@ -204,17 +204,17 @@ const tests = { const suite = new Benchmark.Suite; -Object.keys(tests).filter((name) => (process.argv.length > 2) ? name.indexOf(process.argv[2]) >= 0 : true) - .forEach((name) => { +Object.keys(tests).filter(name => process.argv.length > 2 ? name.includes(process.argv[2]) : true) + .forEach(name => { const test = tests[name]; - test[0].forEach((size) => { - suite.add(name + " " + size, (deferred) => { + test[0].forEach(size => { + suite.add(`${name} ${size}`, deferred => { test[1](size, deferred); }, benchmarkOptions); }); }); -suite.on("cycle", (event) => { +suite.on("cycle", event => { process.stderr.write("\n"); const b = event.target; console.log(b.name + "\t" + Math.floor(1000 * (b.stats.mean - b.stats.moe)) + "\t" + Math.floor(1000 * (b.stats.mean + b.stats.moe))); diff --git a/benchmark/createFixtures.js b/benchmark/createFixtures.js index 9b9855e47..06e566ac4 100644 --- a/benchmark/createFixtures.js +++ b/benchmark/createFixtures.js @@ -7,16 +7,21 @@ try { fs.mkdirSync(fixtures); } catch(e) {} +function generateRequireString(conditional, suffix) { + const prefixedSuffix = suffix ? `.${suffix}` : ""; + return `require(${JSON.stringify(`./${conditional}${prefixedSuffix}.js`)});`; +} + for(let i = 0; i < 10000; i++) { const source = []; if(i > 8) - source.push("require(" + JSON.stringify("./" + (i / 8 | 0) + ".js") + ");"); + source.push(generateRequireString((i / 8 | 0))); if(i > 4) - source.push("require(" + JSON.stringify("./" + (i / 4 | 0) + ".js") + ");"); + source.push(generateRequireString((i / 4 | 0))); if(i > 2) - source.push("require(" + JSON.stringify("./" + (i / 2 | 0) + ".js") + ");"); + source.push(generateRequireString((i / 2 | 0))); if(i > 0) - source.push("require(" + JSON.stringify("./" + (i - 1) + ".js") + ");"); + source.push(generateRequireString((i - 1))); source.push("module.exports = " + i + ";"); fs.writeFileSync(path.join(fixtures, i + ".js"), source.join("\n"), "utf-8"); } @@ -25,13 +30,13 @@ for(let i = 0; i < 10000; i++) { const source = []; source.push("require.ensure([], function(require) {"); if(i > 8) - source.push("require(" + JSON.stringify("./" + (i / 8 | 0) + ".async.js") + ");"); + source.push(generateRequireString((i / 8 | 0), "async")); if(i > 4) - source.push("require(" + JSON.stringify("./" + (i / 4 | 0) + ".async.js") + ");"); + source.push(generateRequireString((i / 4 | 0), "async")); if(i > 2) - source.push("require(" + JSON.stringify("./" + (i / 2 | 0) + ".async.js") + ");"); + source.push(generateRequireString((i / 2 | 0), "async")); if(i > 0) - source.push("require(" + JSON.stringify("./" + (i - 1) + ".async.js") + ");"); + source.push(generateRequireString((i - 1), "async")); source.push("});"); source.push("module.exports = " + i + ";"); fs.writeFileSync(path.join(fixtures, i + ".async.js"), source.join("\n"), "utf-8"); @@ -40,13 +45,13 @@ for(let i = 0; i < 10000; i++) { for(let i = 0; i < 100; i++) { const source = []; if(i > 8) - source.push("require(" + JSON.stringify("./" + (i / 8 | 0) + ".big.js") + ");"); + source.push(generateRequireString((i / 8 | 0), "big")); if(i > 4) - source.push("require(" + JSON.stringify("./" + (i / 4 | 0) + ".big.js") + ");"); + source.push(generateRequireString((i / 4 | 0), "big")); if(i > 2) - source.push("require(" + JSON.stringify("./" + (i / 2 | 0) + ".big.js") + ");"); + source.push(generateRequireString((i / 2 | 0), "big")); if(i > 0) - source.push("require(" + JSON.stringify("./" + (i - 1) + ".big.js") + ");"); + source.push(generateRequireString((i - 1), "big")); for(let j = 0; j < 300; j++) source.push("if(Math.random())hello.world();test.a.b.c.d();x(1,2,3,4);var a,b,c,d,e,f;"); source.push("module.exports = " + i + ";"); diff --git a/lib/CachePlugin.js b/lib/CachePlugin.js index 161418de8..271d7875d 100644 --- a/lib/CachePlugin.js +++ b/lib/CachePlugin.js @@ -9,7 +9,7 @@ const asyncLib = require("async"); class CachePlugin { constructor(cache) { this.cache = cache || {}; - this.FS_ACCURENCY = 2000; + this.FS_ACCURACY = 2000; } apply(compiler) { @@ -19,7 +19,7 @@ class CachePlugin { }); } else { const registerCacheToCompiler = (compiler, cache) => { - compiler.hooks.thisCompilation.tap("CachePlugin", (compilation) => { + compiler.hooks.thisCompilation.tap("CachePlugin", compilation => { compilation.cache = cache; compilation.hooks.childCompiler.tap("CachePlugin", (childCompiler, compilerName, compilerIndex) => { if(cache) { @@ -61,13 +61,13 @@ class CachePlugin { if(err) return callback(err); for(const [file, ts] of fileTs) { - fileTs.set(file, ts + this.FS_ACCURENCY); + fileTs.set(file, ts + this.FS_ACCURACY); } callback(); }); }); - compiler.hooks.afterCompile.tap("CachePlugin", (compilation) => { + compiler.hooks.afterCompile.tap("CachePlugin", compilation => { compilation.compiler._lastCompilationFileDependencies = compilation.fileDependencies; compilation.compiler._lastCompilationContextDependencies = compilation.contextDependencies; }); @@ -76,14 +76,14 @@ class CachePlugin { /* istanbul ignore next */ applyMtime(mtime) { - if(this.FS_ACCURENCY > 1 && mtime % 2 !== 0) - this.FS_ACCURENCY = 1; - else if(this.FS_ACCURENCY > 10 && mtime % 20 !== 0) - this.FS_ACCURENCY = 10; - else if(this.FS_ACCURENCY > 100 && mtime % 200 !== 0) - this.FS_ACCURENCY = 100; - else if(this.FS_ACCURENCY > 1000 && mtime % 2000 !== 0) - this.FS_ACCURENCY = 1000; + if(this.FS_ACCURACY > 1 && mtime % 2 !== 0) + this.FS_ACCURACY = 1; + else if(this.FS_ACCURACY > 10 && mtime % 20 !== 0) + this.FS_ACCURACY = 10; + else if(this.FS_ACCURACY > 100 && mtime % 200 !== 0) + this.FS_ACCURACY = 100; + else if(this.FS_ACCURACY > 1000 && mtime % 2000 !== 0) + this.FS_ACCURACY = 1000; } } module.exports = CachePlugin; diff --git a/lib/CaseSensitiveModulesWarning.js b/lib/CaseSensitiveModulesWarning.js index e62e211c9..132fcb714 100644 --- a/lib/CaseSensitiveModulesWarning.js +++ b/lib/CaseSensitiveModulesWarning.js @@ -13,9 +13,11 @@ module.exports = class CaseSensitiveModulesWarning extends WebpackError { this.name = "CaseSensitiveModulesWarning"; const sortedModules = this._sort(modules); const modulesList = this._moduleMessages(sortedModules); - this.message = "There are multiple modules with names that only differ in casing.\n" + - "This can lead to unexpected behavior when compiling on a filesystem with other case-semantic.\n" + - `Use equal casing. Compare these module identifiers:\n${modulesList}`; + this.message = `There are multiple modules with names that only differ in casing. +This can lead to unexpected behavior when compiling on a filesystem with other case-semantic. +Use equal casing. Compare these module identifiers: +${modulesList}`; + this.origin = this.module = sortedModules[0]; Error.captureStackTrace(this, this.constructor); diff --git a/lib/Chunk.js b/lib/Chunk.js index 168fc8d56..b7086f3ff 100644 --- a/lib/Chunk.js +++ b/lib/Chunk.js @@ -8,6 +8,8 @@ const util = require("util"); const SortableSet = require("./util/SortableSet"); const GraphHelpers = require("./GraphHelpers"); let debugId = 1000; +const ERR_CHUNK_ENTRY = "Chunk.entry was removed. Use hasRuntime()"; +const ERR_CHUNK_INITIAL = "Chunk.initial was removed. Use canBeInitial/isOnlyInitial()"; const sortById = (a, b) => { if(a.id < b.id) return -1; @@ -59,19 +61,19 @@ class Chunk { } get entry() { - throw new Error("Chunk.entry was removed. Use hasRuntime()"); + throw new Error(ERR_CHUNK_ENTRY); } set entry(data) { - throw new Error("Chunk.entry was removed. Use hasRuntime()"); + throw new Error(ERR_CHUNK_ENTRY); } get initial() { - throw new Error("Chunk.initial was removed. Use canBeInitial/isOnlyInitial()"); + throw new Error(ERR_CHUNK_INITIAL); } set initial(data) { - throw new Error("Chunk.initial was removed. Use canBeInitial/isOnlyInitial()"); + throw new Error(ERR_CHUNK_INITIAL); } hasRuntime() { diff --git a/test/CachePlugin.unittest.js b/test/CachePlugin.unittest.js index b8ce6e9a9..a91ddf473 100644 --- a/test/CachePlugin.unittest.js +++ b/test/CachePlugin.unittest.js @@ -20,22 +20,22 @@ describe("CachePlugin", () => { it("sets file system accuracy to 1 for granular modification timestamp", () => { env.plugin.applyMtime(1483819067001); - env.plugin.FS_ACCURENCY.should.be.exactly(1); + env.plugin.FS_ACCURACY.should.be.exactly(1); }); it("sets file system accuracy to 10 for moderately granular modification timestamp", () => { env.plugin.applyMtime(1483819067004); - env.plugin.FS_ACCURENCY.should.be.exactly(10); + env.plugin.FS_ACCURACY.should.be.exactly(10); }); it("sets file system accuracy to 100 for moderately coarse modification timestamp", () => { env.plugin.applyMtime(1483819067040); - env.plugin.FS_ACCURENCY.should.be.exactly(100); + env.plugin.FS_ACCURACY.should.be.exactly(100); }); it("sets file system accuracy to 1000 for coarse modification timestamp", () => { env.plugin.applyMtime(1483819067400); - env.plugin.FS_ACCURENCY.should.be.exactly(1000); + env.plugin.FS_ACCURACY.should.be.exactly(1000); }); }); }); From ff224044f75aaca84b3da333df38089d194a649b Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Sat, 17 Feb 2018 13:35:06 +0100 Subject: [PATCH 090/112] fix example --- examples/common-chunk-and-vendor-chunk/webpack.config.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/common-chunk-and-vendor-chunk/webpack.config.js b/examples/common-chunk-and-vendor-chunk/webpack.config.js index 8d70b62bd..2cdc9599b 100644 --- a/examples/common-chunk-and-vendor-chunk/webpack.config.js +++ b/examples/common-chunk-and-vendor-chunk/webpack.config.js @@ -13,12 +13,14 @@ module.exports = { commons: { chunks: "initial", minChunks: 2, + maxInitialRequests: 5, // The default limit is too small to showcase the effect minSize: 0 // This is example is too small to create commons chunks }, vendor: { test: /node_modules/, chunks: "initial", name: "vendor", + priority: 10, enforce: true } } From 2ad530e4b486c248758f6d9d94070f207ef5f2e9 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Sat, 17 Feb 2018 14:10:00 +0100 Subject: [PATCH 091/112] 4.0.0-beta.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0e33b9bb5..f028fb538 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "webpack", - "version": "4.0.0-beta.1", + "version": "4.0.0-beta.2", "author": "Tobias Koppers @sokra", "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.", "license": "MIT", From 0b13cf19a19fd64d176c77aecbbf00ec57966276 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Sat, 17 Feb 2018 14:14:14 +0100 Subject: [PATCH 092/112] update examples --- examples/aggressive-merging/README.md | 4 +- examples/chunkhash/README.md | 18 +-- .../README.md | 4 +- .../code-splitted-require.context/README.md | 4 +- .../code-splitting-bundle-loader/README.md | 4 +- examples/code-splitting-harmony/README.md | 4 +- .../README.md | 44 ++++---- .../README.md | 4 +- .../README.md | 4 +- examples/code-splitting/README.md | 4 +- examples/coffee-script/README.md | 4 +- .../common-chunk-and-vendor-chunk/README.md | 106 +++++++++--------- examples/common-chunk-grandchildren/README.md | 16 +-- examples/commonjs/README.md | 4 +- .../dll-app-and-vendor/0-vendor/README.md | 4 +- examples/dll-app-and-vendor/1-app/README.md | 4 +- examples/dll-user/README.md | 4 +- examples/dll/README.md | 4 +- examples/explicit-vendor-chunk/README.md | 4 +- examples/externals/README.md | 4 +- examples/extra-async-chunk-advanced/README.md | 36 +++--- examples/extra-async-chunk/README.md | 18 +-- examples/harmony-interop/README.md | 4 +- examples/harmony-library/README.md | 4 +- examples/harmony-unused/README.md | 4 +- examples/harmony/README.md | 4 +- examples/http2-aggressive-splitting/README.md | 64 +++++------ examples/hybrid-routing/README.md | 44 ++++---- examples/i18n/README.md | 4 +- examples/loader/README.md | 4 +- examples/mixed/README.md | 4 +- examples/multi-compiler/README.md | 4 +- examples/multi-part-library/README.md | 4 +- examples/multiple-entry-points/README.md | 8 +- examples/named-chunks/README.md | 8 +- examples/require.context/README.md | 4 +- examples/require.resolve/README.md | 4 +- examples/scope-hoisting/README.md | 4 +- examples/side-effects/README.md | 16 +-- examples/source-map/README.md | 2 +- examples/two-explicit-vendor-chunks/README.md | 4 +- examples/wasm-simple/README.md | 24 ++-- examples/web-worker/README.md | 12 +- 43 files changed, 267 insertions(+), 265 deletions(-) diff --git a/examples/aggressive-merging/README.md b/examples/aggressive-merging/README.md index d2085c577..055f66b1e 100644 --- a/examples/aggressive-merging/README.md +++ b/examples/aggressive-merging/README.md @@ -60,7 +60,7 @@ module.exports = { ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names 0.chunk.js 5.98 KiB 0 [emitted] 1.chunk.js 405 bytes 1 [emitted] @@ -108,7 +108,7 @@ chunk {4} pageA.bundle.js (pageA) 71 bytes >{0}< [entry] [rendered] ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names 0.chunk.js 173 bytes 0, 1 [emitted] 1.chunk.js 118 bytes 1 [emitted] diff --git a/examples/chunkhash/README.md b/examples/chunkhash/README.md index 6d4778c0c..526465a38 100644 --- a/examples/chunkhash/README.md +++ b/examples/chunkhash/README.md @@ -287,22 +287,22 @@ __webpack_require__.e(/*! import() */ 2).then(function() { var module = __webpac ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names - main.[chunkhash].js 765 bytes 0 [emitted] main + main.[chunkhash].js 768 bytes 0 [emitted] main 1.[chunkhash].js 270 bytes 1 [emitted] 2.[chunkhash].js 264 bytes 2 [emitted] runtime~main.[chunkhash].js 7.49 KiB 3 [emitted] runtime~main Entrypoint main = runtime~main.[chunkhash].js main.[chunkhash].js -chunk {0} main.[chunkhash].js (main) 55 bytes ={3}= >{1}< >{2}< [initial] [rendered] +chunk {0} main.[chunkhash].js (main) 58 bytes ={3}= >{1}< >{2}< [initial] [rendered] > ./example main - [0] ./example.js 55 bytes {0} [built] + [0] ./example.js 58 bytes {0} [built] single entry ./example main -chunk {1} 1.[chunkhash].js 29 bytes <{3}> <{0}> [rendered] +chunk {1} 1.[chunkhash].js 29 bytes <{0}> <{3}> [rendered] > ./async1 [0] ./example.js 2:0-18 [1] ./async1.js 29 bytes {1} [built] import() ./async1 [0] ./example.js 2:0-18 -chunk {2} 2.[chunkhash].js 29 bytes <{3}> <{0}> [rendered] +chunk {2} 2.[chunkhash].js 29 bytes <{0}> <{3}> [rendered] > ./async2 [0] ./example.js 3:0-18 [2] ./async2.js 29 bytes {2} [built] import() ./async2 [0] ./example.js 3:0-18 @@ -314,7 +314,7 @@ chunk {3} runtime~main.[chunkhash].js (runtime~main) 0 bytes ={0}= >{1}< >{2} ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names 0.[chunkhash].js 77 bytes 0 [emitted] 1.[chunkhash].js 78 bytes 1 [emitted] @@ -331,8 +331,8 @@ chunk {1} 1.[chunkhash].js 29 bytes <{2}> <{3}> [rendered] import() ./async1 [0] ./example.js 2:0-18 chunk {2} runtime~main.[chunkhash].js (runtime~main) 0 bytes ={3}= >{0}< >{1}< [entry] [rendered] > ./example main -chunk {3} main.[chunkhash].js (main) 55 bytes ={2}= >{0}< >{1}< [initial] [rendered] +chunk {3} main.[chunkhash].js (main) 58 bytes ={2}= >{0}< >{1}< [initial] [rendered] > ./example main - [0] ./example.js 55 bytes {3} [built] + [0] ./example.js 58 bytes {3} [built] single entry ./example main ``` diff --git a/examples/code-splitted-require.context-amd/README.md b/examples/code-splitted-require.context-amd/README.md index d2fa5a8f0..178780498 100644 --- a/examples/code-splitted-require.context-amd/README.md +++ b/examples/code-splitted-require.context-amd/README.md @@ -311,7 +311,7 @@ module.exports = function() { ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names 0.output.js 1.86 KiB 0 [emitted] output.js 7.19 KiB 1 [emitted] main @@ -339,7 +339,7 @@ chunk {1} output.js (main) 261 bytes >{0}< [entry] [rendered] ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names 0.output.js 627 bytes 0 [emitted] output.js 1.75 KiB 1 [emitted] main diff --git a/examples/code-splitted-require.context/README.md b/examples/code-splitted-require.context/README.md index 6896878bc..515968bbe 100644 --- a/examples/code-splitted-require.context/README.md +++ b/examples/code-splitted-require.context/README.md @@ -311,7 +311,7 @@ module.exports = function() { ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names 0.output.js 1.86 KiB 0 [emitted] output.js 7.13 KiB 1 [emitted] main @@ -339,7 +339,7 @@ chunk {1} output.js (main) 276 bytes >{0}< [entry] [rendered] ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names 0.output.js 627 bytes 0 [emitted] output.js 1.73 KiB 1 [emitted] main diff --git a/examples/code-splitting-bundle-loader/README.md b/examples/code-splitting-bundle-loader/README.md index 3e173eb21..0888ab509 100644 --- a/examples/code-splitting-bundle-loader/README.md +++ b/examples/code-splitting-bundle-loader/README.md @@ -266,7 +266,7 @@ module.exports = "It works"; ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names 0.output.js 257 bytes 0 [emitted] output.js 7.56 KiB 1 [emitted] main @@ -287,7 +287,7 @@ chunk {1} output.js (main) 378 bytes >{0}< [entry] [rendered] ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names 0.output.js 98 bytes 0 [emitted] output.js 1.79 KiB 1 [emitted] main diff --git a/examples/code-splitting-harmony/README.md b/examples/code-splitting-harmony/README.md index 8efaf0ed0..d762f33d3 100644 --- a/examples/code-splitting-harmony/README.md +++ b/examples/code-splitting-harmony/README.md @@ -305,7 +305,7 @@ Promise.all([loadC("1"), loadC("2")]).then(function(arr) { ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names 0.output.js 275 bytes 0 [emitted] 1.output.js 284 bytes 1 [emitted] @@ -337,7 +337,7 @@ chunk {3} output.js (main) 427 bytes >{0}< >{1}< >{2}< [entry] [rendered] ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names 0.output.js 76 bytes 0 [emitted] 1.output.js 77 bytes 1 [emitted] diff --git a/examples/code-splitting-native-import-context-filter/README.md b/examples/code-splitting-native-import-context-filter/README.md index 76aa2beaa..25595e12b 100644 --- a/examples/code-splitting-native-import-context-filter/README.md +++ b/examples/code-splitting-native-import-context-filter/README.md @@ -321,39 +321,39 @@ getTemplate("baz.noimport"); ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names -0.output.js 433 bytes 0 [emitted] -1.output.js 442 bytes 1 [emitted] -2.output.js 436 bytes 2 [emitted] - output.js 8.21 KiB 3 [emitted] main +0.output.js 436 bytes 0 [emitted] +1.output.js 445 bytes 1 [emitted] +2.output.js 439 bytes 2 [emitted] + output.js 8.22 KiB 3 [emitted] main Entrypoint main = output.js -chunk {0} 0.output.js 38 bytes <{3}> [rendered] +chunk {0} 0.output.js 41 bytes <{3}> [rendered] > ./foo [3] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./foo > ./foo.js [3] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./foo.js - [0] ./templates/foo.js 38 bytes {0} [optional] [built] + [0] ./templates/foo.js 41 bytes {0} [optional] [built] [exports: default] context element ./foo.js [3] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./foo.js context element ./foo [3] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./foo -chunk {1} 1.output.js 38 bytes <{3}> [rendered] +chunk {1} 1.output.js 41 bytes <{3}> [rendered] > ./baz [3] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./baz > ./baz.js [3] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./baz.js - [1] ./templates/baz.js 38 bytes {1} [optional] [built] + [1] ./templates/baz.js 41 bytes {1} [optional] [built] [exports: default] context element ./baz.js [3] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./baz.js context element ./baz [3] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./baz -chunk {2} 2.output.js 38 bytes <{3}> [rendered] +chunk {2} 2.output.js 41 bytes <{3}> [rendered] > ./bar [3] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./bar > ./bar.js [3] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./bar.js - [2] ./templates/bar.js 38 bytes {2} [optional] [built] + [2] ./templates/bar.js 41 bytes {2} [optional] [built] [exports: default] context element ./bar.js [3] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./bar.js context element ./bar [3] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./bar -chunk {3} output.js (main) 597 bytes >{0}< >{1}< >{2}< [entry] [rendered] +chunk {3} output.js (main) 618 bytes >{0}< >{1}< >{2}< [entry] [rendered] > .\example.js main [3] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object 160 bytes {3} [optional] [built] import() context lazy ./templates [4] ./example.js 3:23-7:3 - [4] ./example.js 437 bytes {3} [built] + [4] ./example.js 458 bytes {3} [built] single entry .\example.js main ``` @@ -361,38 +361,38 @@ chunk {3} output.js (main) 597 bytes >{0}< >{1}< >{2}< [entry] [rendered] ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names 0.output.js 113 bytes 0 [emitted] 1.output.js 114 bytes 1 [emitted] 2.output.js 115 bytes 2 [emitted] output.js 2.13 KiB 3 [emitted] main Entrypoint main = output.js -chunk {0} 0.output.js 38 bytes <{3}> [rendered] +chunk {0} 0.output.js 41 bytes <{3}> [rendered] > ./foo [3] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./foo > ./foo.js [3] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./foo.js - [0] ./templates/foo.js 38 bytes {0} [optional] [built] + [0] ./templates/foo.js 41 bytes {0} [optional] [built] [exports: default] context element ./foo.js [3] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./foo.js context element ./foo [3] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./foo -chunk {1} 1.output.js 38 bytes <{3}> [rendered] +chunk {1} 1.output.js 41 bytes <{3}> [rendered] > ./baz [3] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./baz > ./baz.js [3] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./baz.js - [1] ./templates/baz.js 38 bytes {1} [optional] [built] + [1] ./templates/baz.js 41 bytes {1} [optional] [built] [exports: default] context element ./baz.js [3] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./baz.js context element ./baz [3] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./baz -chunk {2} 2.output.js 38 bytes <{3}> [rendered] +chunk {2} 2.output.js 41 bytes <{3}> [rendered] > ./bar [3] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./bar > ./bar.js [3] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./bar.js - [2] ./templates/bar.js 38 bytes {2} [optional] [built] + [2] ./templates/bar.js 41 bytes {2} [optional] [built] [exports: default] context element ./bar.js [3] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./bar.js context element ./bar [3] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./bar -chunk {3} output.js (main) 597 bytes >{0}< >{1}< >{2}< [entry] [rendered] +chunk {3} output.js (main) 618 bytes >{0}< >{1}< >{2}< [entry] [rendered] > .\example.js main [3] ./templates lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object 160 bytes {3} [optional] [built] import() context lazy ./templates [4] ./example.js 3:23-7:3 - [4] ./example.js 437 bytes {3} [built] + [4] ./example.js 458 bytes {3} [built] single entry .\example.js main ``` diff --git a/examples/code-splitting-native-import-context/README.md b/examples/code-splitting-native-import-context/README.md index 97c8f515e..14a0d7090 100644 --- a/examples/code-splitting-native-import-context/README.md +++ b/examples/code-splitting-native-import-context/README.md @@ -308,7 +308,7 @@ getTemplate("baz"); ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names 0.output.js 436 bytes 0 [emitted] 1.output.js 445 bytes 1 [emitted] @@ -348,7 +348,7 @@ chunk {3} output.js (main) 456 bytes >{0}< >{1}< >{2}< [entry] [rendered] ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names 0.output.js 113 bytes 0 [emitted] 1.output.js 114 bytes 1 [emitted] diff --git a/examples/code-splitting-specify-chunk-name/README.md b/examples/code-splitting-specify-chunk-name/README.md index 1e95316bd..774856e6a 100644 --- a/examples/code-splitting-specify-chunk-name/README.md +++ b/examples/code-splitting-specify-chunk-name/README.md @@ -300,7 +300,7 @@ __webpack_require__(3)("./ba" + createContextVar).then(function(bar) { ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names 0.output.js 445 bytes 0 [emitted] chunk-bar-baz2 1.output.js 439 bytes 1 [emitted] chunk-bar-baz0 @@ -340,7 +340,7 @@ chunk {3} output.js (main) 580 bytes >{0}< >{1}< >{2}< [entry] [rendered] ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names 0.output.js 114 bytes 0 [emitted] chunk-bar-baz2 1.output.js 115 bytes 1 [emitted] chunk-bar-baz0 diff --git a/examples/code-splitting/README.md b/examples/code-splitting/README.md index 874c32d33..f1a7f60b9 100644 --- a/examples/code-splitting/README.md +++ b/examples/code-splitting/README.md @@ -301,7 +301,7 @@ Minimized ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names 0.output.js 490 bytes 0 [emitted] output.js 7.47 KiB 1 [emitted] main @@ -320,7 +320,7 @@ chunk {1} output.js (main) 166 bytes >{0}< [entry] [rendered] ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names 0.output.js 95 bytes 0 [emitted] output.js 1.68 KiB 1 [emitted] main diff --git a/examples/coffee-script/README.md b/examples/coffee-script/README.md index be62477a3..113b9ad8f 100644 --- a/examples/coffee-script/README.md +++ b/examples/coffee-script/README.md @@ -153,7 +153,7 @@ module.exports = 42; ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names output.js 3.35 KiB 0 [emitted] main Entrypoint main = output.js @@ -172,7 +172,7 @@ chunk {0} output.js (main) 206 bytes [entry] [rendered] ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names output.js 708 bytes 0 [emitted] main Entrypoint main = output.js diff --git a/examples/common-chunk-and-vendor-chunk/README.md b/examples/common-chunk-and-vendor-chunk/README.md index 32093930f..78a646a9b 100644 --- a/examples/common-chunk-and-vendor-chunk/README.md +++ b/examples/common-chunk-and-vendor-chunk/README.md @@ -49,12 +49,14 @@ module.exports = { commons: { chunks: "initial", minChunks: 2, + maxInitialRequests: 5, // The default limit is too small to showcase the effect minSize: 0 // This is example is too small to create commons chunks }, vendor: { test: /node_modules/, chunks: "initial", name: "vendor", + priority: 10, enforce: true } } @@ -70,7 +72,7 @@ module.exports = { # dist/vendor.js ``` javascript -(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[5],{ +(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[3],{ /***/ 1: /*!*********************************!*\ @@ -100,7 +102,7 @@ module.exports = "vendor2"; # dist/commons~pageA~pageB~pageC.js ``` javascript -(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[3],{ +(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[4],{ /***/ 3: /*!*********************!*\ @@ -119,7 +121,7 @@ module.exports = "utility2"; # dist/commons~pageB~pageC.js ``` javascript -(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[4],{ +(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[5],{ /***/ 6: /*!*********************!*\ @@ -270,7 +272,7 @@ module.exports = "utility3"; /******/ /******/ /******/ // add entry module to deferred list -/******/ deferredModules.push([0,3,5]); +/******/ deferredModules.push([0,3,4]); /******/ // run deferred modules when ready /******/ return checkDeferredModules(); /******/ }) @@ -602,7 +604,7 @@ module.exports = "pageB"; /******/ /******/ /******/ // add entry module to deferred list -/******/ deferredModules.push([7,3,4]); +/******/ deferredModules.push([7,4,5]); /******/ // run deferred modules when ready /******/ return checkDeferredModules(); /******/ }) @@ -632,96 +634,96 @@ module.exports = "pageC"; ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names - pageA.js 5.59 KiB 0 [emitted] pageA + pageA.js 5.6 KiB 0 [emitted] pageA pageB.js 5.4 KiB 1 [emitted] pageB pageC.js 5.34 KiB 2 [emitted] pageC -commons~pageA~pageB~pageC.js 269 bytes 3 [emitted] commons~pageA~pageB~pageC - commons~pageB~pageC.js 269 bytes 4 [emitted] commons~pageB~pageC - vendor.js 536 bytes 5 [emitted] vendor -Entrypoint pageA = commons~pageA~pageB~pageC.js vendor.js pageA.js -Entrypoint pageB = commons~pageA~pageB~pageC.js commons~pageB~pageC.js vendor.js pageB.js + vendor.js 536 bytes 3 [emitted] vendor +commons~pageA~pageB~pageC.js 269 bytes 4 [emitted] commons~pageA~pageB~pageC + commons~pageB~pageC.js 269 bytes 5 [emitted] commons~pageB~pageC +Entrypoint pageA = vendor.js commons~pageA~pageB~pageC.js pageA.js +Entrypoint pageB = vendor.js commons~pageA~pageB~pageC.js commons~pageB~pageC.js pageB.js Entrypoint pageC = commons~pageA~pageB~pageC.js commons~pageB~pageC.js pageC.js -chunk {0} pageA.js (pageA) 165 bytes ={3}= ={5}= [entry] [rendered] +chunk {0} pageA.js (pageA) 170 bytes ={3}= ={4}= [entry] [rendered] > ./pageA pageA - [0] ./pageA.js 137 bytes {0} [built] + [0] ./pageA.js 142 bytes {0} [built] single entry ./pageA pageA [2] ./utility1.js 28 bytes {0} [built] cjs require ./utility1 [0] ./pageA.js 2:15-36 -chunk {1} pageB.js (pageB) 137 bytes ={3}= ={4}= ={5}= [entry] [rendered] +chunk {1} pageB.js (pageB) 142 bytes ={3}= ={4}= ={5}= [entry] [rendered] > ./pageB pageB - [4] ./pageB.js 137 bytes {1} [built] + [4] ./pageB.js 142 bytes {1} [built] single entry ./pageB pageB -chunk {2} pageC.js (pageC) 105 bytes ={3}= ={4}= [entry] [rendered] +chunk {2} pageC.js (pageC) 105 bytes ={4}= ={5}= [entry] [rendered] > ./pageC pageC [7] ./pageC.js 105 bytes {2} [built] single entry ./pageC pageC -chunk {3} commons~pageA~pageB~pageC.js (commons~pageA~pageB~pageC) 28 bytes ={4}= ={2}= ={5}= ={1}= ={0}= [initial] [rendered] split chunk (cache group: commons) (name: commons~pageA~pageB~pageC) - > ./pageC pageC - > ./pageB pageB - > ./pageA pageA - [3] ./utility2.js 28 bytes {3} [built] - cjs require ./utility2 [0] ./pageA.js 3:15-36 - cjs require ./utility2 [4] ./pageB.js 2:15-36 - cjs require ./utility2 [7] ./pageC.js 1:15-36 -chunk {4} commons~pageB~pageC.js (commons~pageB~pageC) 28 bytes ={3}= ={2}= ={5}= ={1}= [initial] [rendered] split chunk (cache group: commons) (name: commons~pageB~pageC) - > ./pageC pageC - > ./pageB pageB - [6] ./utility3.js 28 bytes {4} [built] - cjs require ./utility3 [4] ./pageB.js 3:15-36 - cjs require ./utility3 [7] ./pageC.js 2:15-36 -chunk {5} vendor.js (vendor) 54 bytes ={3}= ={0}= ={4}= ={1}= [initial] [rendered] split chunk (cache group: vendor) (name: vendor) +chunk {3} vendor.js (vendor) 54 bytes ={0}= ={1}= ={4}= ={5}= [initial] [rendered] split chunk (cache group: vendor) (name: vendor) > ./pageA pageA > ./pageB pageB 2 modules +chunk {4} commons~pageA~pageB~pageC.js (commons~pageA~pageB~pageC) 28 bytes ={0}= ={1}= ={2}= ={3}= ={5}= [initial] [rendered] split chunk (cache group: commons) (name: commons~pageA~pageB~pageC) + > ./pageA pageA + > ./pageB pageB + > ./pageC pageC + [3] ./utility2.js 28 bytes {4} [built] + cjs require ./utility2 [0] ./pageA.js 3:15-36 + cjs require ./utility2 [4] ./pageB.js 2:15-36 + cjs require ./utility2 [7] ./pageC.js 1:15-36 +chunk {5} commons~pageB~pageC.js (commons~pageB~pageC) 28 bytes ={1}= ={2}= ={3}= ={4}= [initial] [rendered] split chunk (cache group: commons) (name: commons~pageB~pageC) + > ./pageB pageB + > ./pageC pageC + [6] ./utility3.js 28 bytes {5} [built] + cjs require ./utility3 [4] ./pageB.js 3:15-36 + cjs require ./utility3 [7] ./pageC.js 2:15-36 ``` ## Production mode ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names commons~pageA~pageB~pageC.js 96 bytes 0 [emitted] commons~pageA~pageB~pageC - vendor.js 134 bytes 1 [emitted] vendor - commons~pageB~pageC.js 97 bytes 2 [emitted] commons~pageB~pageC + commons~pageB~pageC.js 97 bytes 1 [emitted] commons~pageB~pageC + vendor.js 134 bytes 2 [emitted] vendor pageC.js 1.1 KiB 3 [emitted] pageC pageB.js 1.11 KiB 4 [emitted] pageB pageA.js 1.15 KiB 5 [emitted] pageA -Entrypoint pageA = commons~pageA~pageB~pageC.js vendor.js pageA.js -Entrypoint pageB = commons~pageA~pageB~pageC.js commons~pageB~pageC.js vendor.js pageB.js +Entrypoint pageA = vendor.js commons~pageA~pageB~pageC.js pageA.js +Entrypoint pageB = vendor.js commons~pageA~pageB~pageC.js commons~pageB~pageC.js pageB.js Entrypoint pageC = commons~pageA~pageB~pageC.js commons~pageB~pageC.js pageC.js -chunk {0} commons~pageA~pageB~pageC.js (commons~pageA~pageB~pageC) 28 bytes ={2}= ={3}= ={1}= ={4}= ={5}= [initial] [rendered] split chunk (cache group: commons) (name: commons~pageA~pageB~pageC) - > ./pageC pageC - > ./pageB pageB +chunk {0} commons~pageA~pageB~pageC.js (commons~pageA~pageB~pageC) 28 bytes ={1}= ={2}= ={3}= ={4}= ={5}= [initial] [rendered] split chunk (cache group: commons) (name: commons~pageA~pageB~pageC) > ./pageA pageA + > ./pageB pageB + > ./pageC pageC [0] ./utility2.js 28 bytes {0} [built] cjs require ./utility2 [2] ./pageC.js 1:15-36 cjs require ./utility2 [4] ./pageB.js 2:15-36 cjs require ./utility2 [7] ./pageA.js 3:15-36 -chunk {1} vendor.js (vendor) 54 bytes ={0}= ={5}= ={2}= ={4}= [initial] [rendered] split chunk (cache group: vendor) (name: vendor) +chunk {1} commons~pageB~pageC.js (commons~pageB~pageC) 28 bytes ={0}= ={2}= ={3}= ={4}= [initial] [rendered] split chunk (cache group: commons) (name: commons~pageB~pageC) + > ./pageB pageB + > ./pageC pageC + [1] ./utility3.js 28 bytes {1} [built] + cjs require ./utility3 [2] ./pageC.js 2:15-36 + cjs require ./utility3 [4] ./pageB.js 3:15-36 +chunk {2} vendor.js (vendor) 54 bytes ={0}= ={1}= ={4}= ={5}= [initial] [rendered] split chunk (cache group: vendor) (name: vendor) > ./pageA pageA > ./pageB pageB 2 modules -chunk {2} commons~pageB~pageC.js (commons~pageB~pageC) 28 bytes ={0}= ={3}= ={1}= ={4}= [initial] [rendered] split chunk (cache group: commons) (name: commons~pageB~pageC) - > ./pageC pageC - > ./pageB pageB - [1] ./utility3.js 28 bytes {2} [built] - cjs require ./utility3 [2] ./pageC.js 2:15-36 - cjs require ./utility3 [4] ./pageB.js 3:15-36 -chunk {3} pageC.js (pageC) 105 bytes ={0}= ={2}= [entry] [rendered] +chunk {3} pageC.js (pageC) 105 bytes ={0}= ={1}= [entry] [rendered] > ./pageC pageC [2] ./pageC.js 105 bytes {3} [built] single entry ./pageC pageC -chunk {4} pageB.js (pageB) 137 bytes ={0}= ={2}= ={1}= [entry] [rendered] +chunk {4} pageB.js (pageB) 142 bytes ={0}= ={1}= ={2}= [entry] [rendered] > ./pageB pageB - [4] ./pageB.js 137 bytes {4} [built] + [4] ./pageB.js 142 bytes {4} [built] single entry ./pageB pageB -chunk {5} pageA.js (pageA) 165 bytes ={0}= ={1}= [entry] [rendered] +chunk {5} pageA.js (pageA) 170 bytes ={0}= ={2}= [entry] [rendered] > ./pageA pageA [5] ./utility1.js 28 bytes {5} [built] cjs require ./utility1 [7] ./pageA.js 2:15-36 - [7] ./pageA.js 137 bytes {5} [built] + [7] ./pageA.js 142 bytes {5} [built] single entry ./pageA pageA ``` diff --git a/examples/common-chunk-grandchildren/README.md b/examples/common-chunk-grandchildren/README.md index 79d1c2384..2477bfe19 100644 --- a/examples/common-chunk-grandchildren/README.md +++ b/examples/common-chunk-grandchildren/README.md @@ -430,7 +430,7 @@ module.exports = function() { ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names 0.output.js 340 bytes 0 [emitted] 1.output.js 549 bytes 1 [emitted] @@ -438,9 +438,9 @@ Version: webpack 4.0.0-beta.1 3.output.js 414 bytes 3 [emitted] output.js 7.53 KiB 4 [emitted] main Entrypoint main = output.js -chunk {0} 0.output.js 72 bytes <{1}> <{4}> ={3}= ={2}= [rendered] split chunk (cache group: default) - > [2] ./pageB.js 3:1-6:3 +chunk {0} 0.output.js 72 bytes <{1}> <{4}> ={2}= ={3}= [rendered] split chunk (cache group: default) > [0] ./example.js 3:1-6:3 + > [2] ./pageB.js 3:1-6:3 [4] ./reusableComponent.js 72 bytes {0} [built] cjs require ./reusableComponent [3] ./pageA.js 1:24-54 cjs require ./reusableComponent [5] ./pageC.js 1:24-54 @@ -456,7 +456,7 @@ chunk {3} 3.output.js 142 bytes <{1}> ={0}= [rendered] > [2] ./pageB.js 3:1-6:3 [5] ./pageC.js 142 bytes {3} [built] cjs require ./pageC [2] ./pageB.js 4:15-33 -chunk {4} output.js (main) 261 bytes >{0}< >{2}< >{1}< [entry] [rendered] +chunk {4} output.js (main) 261 bytes >{0}< >{1}< >{2}< [entry] [rendered] > main [0] ./example.js 233 bytes {4} [built] single entry ./example.js [1] multi ./example.js main:100000 @@ -468,7 +468,7 @@ chunk {4} output.js (main) 261 bytes >{0}< >{2}< >{1}< [entry] [rendered] ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names 0.output.js 133 bytes 0 [emitted] 1.output.js 198 bytes 1 [emitted] @@ -476,9 +476,9 @@ Version: webpack 4.0.0-beta.1 3.output.js 138 bytes 3 [emitted] output.js 1.76 KiB 4 [emitted] main Entrypoint main = output.js -chunk {0} 0.output.js 72 bytes <{1}> <{4}> ={3}= ={2}= [rendered] split chunk (cache group: default) - > [2] ./pageB.js 3:1-6:3 +chunk {0} 0.output.js 72 bytes <{1}> <{4}> ={2}= ={3}= [rendered] split chunk (cache group: default) > [0] ./example.js 3:1-6:3 + > [2] ./pageB.js 3:1-6:3 [4] ./reusableComponent.js 72 bytes {0} [built] cjs require ./reusableComponent [3] ./pageA.js 1:24-54 cjs require ./reusableComponent [5] ./pageC.js 1:24-54 @@ -494,7 +494,7 @@ chunk {3} 3.output.js 142 bytes <{1}> ={0}= [rendered] > [2] ./pageB.js 3:1-6:3 [5] ./pageC.js 142 bytes {3} [built] cjs require ./pageC [2] ./pageB.js 4:15-33 -chunk {4} output.js (main) 261 bytes >{0}< >{2}< >{1}< [entry] [rendered] +chunk {4} output.js (main) 261 bytes >{0}< >{1}< >{2}< [entry] [rendered] > main [0] ./example.js 233 bytes {4} [built] single entry ./example.js [1] multi ./example.js main:100000 diff --git a/examples/commonjs/README.md b/examples/commonjs/README.md index 43441b13c..6cc2b4e52 100644 --- a/examples/commonjs/README.md +++ b/examples/commonjs/README.md @@ -167,7 +167,7 @@ exports.add = function() { ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names output.js 3.44 KiB 0 [emitted] main Entrypoint main = output.js @@ -185,7 +185,7 @@ chunk {0} output.js (main) 329 bytes [entry] [rendered] ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names output.js 740 bytes 0 [emitted] main Entrypoint main = output.js diff --git a/examples/dll-app-and-vendor/0-vendor/README.md b/examples/dll-app-and-vendor/0-vendor/README.md index 11ebe81cd..f85646a01 100644 --- a/examples/dll-app-and-vendor/0-vendor/README.md +++ b/examples/dll-app-and-vendor/0-vendor/README.md @@ -166,7 +166,7 @@ function square(n) { ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names vendor.js 3.32 KiB 0 [emitted] main Entrypoint main = vendor.js @@ -182,7 +182,7 @@ chunk {0} vendor.js (main) 60 bytes [entry] [rendered] ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names vendor.js 704 bytes 0 [emitted] main Entrypoint main = vendor.js diff --git a/examples/dll-app-and-vendor/1-app/README.md b/examples/dll-app-and-vendor/1-app/README.md index 9e549201c..39033fe99 100644 --- a/examples/dll-app-and-vendor/1-app/README.md +++ b/examples/dll-app-and-vendor/1-app/README.md @@ -174,7 +174,7 @@ module.exports = vendor_lib_9ee2f174307b7ef21301; ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names app.js 3.9 KiB 0 [emitted] main Entrypoint main = app.js @@ -196,7 +196,7 @@ chunk {0} app.js (main) 182 bytes [entry] [rendered] ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names app.js 736 bytes 0 [emitted] main Entrypoint main = app.js diff --git a/examples/dll-user/README.md b/examples/dll-user/README.md index 4ad87d5d6..d4ce06d0d 100644 --- a/examples/dll-user/README.md +++ b/examples/dll-user/README.md @@ -227,7 +227,7 @@ module.exports = (__webpack_require__(/*! dll-reference alpha_ae937b5d3e880b635a ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names output.js 6.19 KiB 0 [emitted] main Entrypoint main = output.js @@ -261,7 +261,7 @@ chunk {0} output.js (main) 549 bytes [entry] [rendered] ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names output.js 972 bytes 0 [emitted] main Entrypoint main = output.js diff --git a/examples/dll/README.md b/examples/dll/README.md index f229837a0..066bfb14f 100644 --- a/examples/dll/README.md +++ b/examples/dll/README.md @@ -177,7 +177,7 @@ module.exports = "module"; ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names MyDll.alpha.js 3.46 KiB 0 [emitted] alpha MyDll.beta.js 3.43 KiB 1 [emitted] beta @@ -215,7 +215,7 @@ chunk {1} MyDll.beta.js (beta) 80 bytes [entry] [rendered] ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names MyDll.beta.js 691 bytes 0 [emitted] beta MyDll.alpha.js 700 bytes 1 [emitted] alpha diff --git a/examples/explicit-vendor-chunk/README.md b/examples/explicit-vendor-chunk/README.md index f20ad9cde..5824f6f86 100644 --- a/examples/explicit-vendor-chunk/README.md +++ b/examples/explicit-vendor-chunk/README.md @@ -281,7 +281,7 @@ module.exports = vendor_36000db9190edee14765; ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Child vendor: Hash: 0a1b2c3d4e5f6a7b8c9d Asset Size Chunks Chunk Names @@ -335,7 +335,7 @@ Child app: ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Child vendor: Hash: 0a1b2c3d4e5f6a7b8c9d Asset Size Chunks Chunk Names diff --git a/examples/externals/README.md b/examples/externals/README.md index f419fbd3f..c1fe360ef 100644 --- a/examples/externals/README.md +++ b/examples/externals/README.md @@ -183,7 +183,7 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__2__; ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names output.js 4.17 KiB 0 [emitted] main Entrypoint main = output.js @@ -201,7 +201,7 @@ chunk {0} output.js (main) 197 bytes [entry] [rendered] ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names output.js 1.02 KiB 0 [emitted] main Entrypoint main = output.js diff --git a/examples/extra-async-chunk-advanced/README.md b/examples/extra-async-chunk-advanced/README.md index fadf87d0c..58def38af 100644 --- a/examples/extra-async-chunk-advanced/README.md +++ b/examples/extra-async-chunk-advanced/README.md @@ -228,9 +228,9 @@ module.exports = { /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -Promise.all(/*! AMD require */[__webpack_require__.e(0), __webpack_require__.e(1), __webpack_require__.e(4)]).then(function() { var __WEBPACK_AMD_REQUIRE_ARRAY__ = [__webpack_require__(/*! ./a */ 1), __webpack_require__(/*! ./b */ 0), __webpack_require__(/*! ./c */ 7)]; (function(a, b, c) {}).apply(null, __WEBPACK_AMD_REQUIRE_ARRAY__);}).catch(__webpack_require__.oe); +Promise.all(/*! AMD require */[__webpack_require__.e(1), __webpack_require__.e(0), __webpack_require__.e(4)]).then(function() { var __WEBPACK_AMD_REQUIRE_ARRAY__ = [__webpack_require__(/*! ./a */ 1), __webpack_require__(/*! ./b */ 0), __webpack_require__(/*! ./c */ 7)]; (function(a, b, c) {}).apply(null, __WEBPACK_AMD_REQUIRE_ARRAY__);}).catch(__webpack_require__.oe); -Promise.all(/*! require.ensure */[__webpack_require__.e(0), __webpack_require__.e(1), __webpack_require__.e(3)]).then((function(require) { +Promise.all(/*! require.ensure */[__webpack_require__.e(1), __webpack_require__.e(0), __webpack_require__.e(3)]).then((function(require) { __webpack_require__(/*! ./b */ 0); __webpack_require__(/*! ./d */ 6); }).bind(null, __webpack_require__)).catch(__webpack_require__.oe); @@ -257,7 +257,7 @@ Promise.all(/*! require.ensure */[__webpack_require__.e(0), __webpack_require__. ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names 0.output.js 247 bytes 0 [emitted] 1.output.js 238 bytes 1 [emitted] @@ -268,20 +268,20 @@ Version: webpack 4.0.0-beta.1 6.output.js 241 bytes 6 [emitted] output.js 8.07 KiB 7 [emitted] main Entrypoint main = output.js -chunk {0} 0.output.js 21 bytes <{7}> ={2}= ={1}= ={3}= ={4}= >{1}< >{5}< >{6}< [rendered] split chunk (cache group: default) - > [2] ./example.js 8:0-16:2 - > [2] ./example.js 3:0-6:2 +chunk {0} 0.output.js 21 bytes <{7}> ={1}= ={2}= ={3}= ={4}= >{1}< >{5}< >{6}< [rendered] split chunk (cache group: default) > ./a ./b ./c [2] ./example.js 1:0-52 + > [2] ./example.js 3:0-6:2 + > [2] ./example.js 8:0-16:2 [1] ./a.js 21 bytes {0} [built] amd require ./a [2] ./example.js 1:0-52 require.ensure item ./a [2] ./example.js 3:0-6:2 require.ensure item ./a [2] ./example.js 8:0-16:2 cjs require ./a [2] ./example.js 9:1-15 -chunk {1} 1.output.js 21 bytes <{0}> <{2}> <{7}> ={5}= ={6}= ={0}= ={3}= ={4}= [rendered] split chunk (cache group: default) - > [2] ./example.js 13:1-15:3 +chunk {1} 1.output.js 21 bytes <{0}> <{2}> <{7}> ={0}= ={3}= ={4}= ={5}= ={6}= [rendered] split chunk (cache group: default) > [2] ./example.js 10:1-12:3 - > [2] ./example.js 3:0-6:2 + > [2] ./example.js 13:1-15:3 > ./a ./b ./c [2] ./example.js 1:0-52 + > [2] ./example.js 3:0-6:2 [0] ./b.js 21 bytes {1} [built] amd require ./b [2] ./example.js 1:0-52 cjs require ./b [2] ./example.js 4:1-15 @@ -307,7 +307,7 @@ chunk {6} 6.output.js 21 bytes <{0}> <{2}> ={1}= [rendered] > [2] ./example.js 10:1-12:3 [4] ./f.js 21 bytes {6} [built] cjs require ./f [2] ./example.js 11:2-16 -chunk {7} output.js (main) 362 bytes >{0}< >{1}< >{3}< >{4}< >{2}< [entry] [rendered] +chunk {7} output.js (main) 362 bytes >{0}< >{1}< >{2}< >{3}< >{4}< [entry] [rendered] > .\example.js main [2] ./example.js 362 bytes {7} [built] single entry .\example.js main @@ -317,7 +317,7 @@ chunk {7} output.js (main) 362 bytes >{0}< >{1}< >{3}< >{4}< >{2}< [entry] [r ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names 0.output.js 90 bytes 0 [emitted] 1.output.js 89 bytes 1 [emitted] @@ -328,20 +328,20 @@ Version: webpack 4.0.0-beta.1 6.output.js 91 bytes 6 [emitted] output.js 2.02 KiB 7 [emitted] main Entrypoint main = output.js -chunk {0} 0.output.js 21 bytes <{7}> ={2}= ={1}= ={3}= ={4}= >{1}< >{5}< >{6}< [rendered] split chunk (cache group: default) - > [2] ./example.js 8:0-16:2 - > [2] ./example.js 3:0-6:2 +chunk {0} 0.output.js 21 bytes <{7}> ={1}= ={2}= ={3}= ={4}= >{1}< >{5}< >{6}< [rendered] split chunk (cache group: default) > ./a ./b ./c [2] ./example.js 1:0-52 + > [2] ./example.js 3:0-6:2 + > [2] ./example.js 8:0-16:2 [1] ./a.js 21 bytes {0} [built] amd require ./a [2] ./example.js 1:0-52 require.ensure item ./a [2] ./example.js 3:0-6:2 require.ensure item ./a [2] ./example.js 8:0-16:2 cjs require ./a [2] ./example.js 9:1-15 -chunk {1} 1.output.js 21 bytes <{0}> <{2}> <{7}> ={5}= ={6}= ={0}= ={3}= ={4}= [rendered] split chunk (cache group: default) - > [2] ./example.js 13:1-15:3 +chunk {1} 1.output.js 21 bytes <{0}> <{2}> <{7}> ={0}= ={3}= ={4}= ={5}= ={6}= [rendered] split chunk (cache group: default) > [2] ./example.js 10:1-12:3 - > [2] ./example.js 3:0-6:2 + > [2] ./example.js 13:1-15:3 > ./a ./b ./c [2] ./example.js 1:0-52 + > [2] ./example.js 3:0-6:2 [0] ./b.js 21 bytes {1} [built] amd require ./b [2] ./example.js 1:0-52 cjs require ./b [2] ./example.js 4:1-15 @@ -367,7 +367,7 @@ chunk {6} 6.output.js 21 bytes <{0}> <{2}> ={1}= [rendered] > [2] ./example.js 10:1-12:3 [4] ./f.js 21 bytes {6} [built] cjs require ./f [2] ./example.js 11:2-16 -chunk {7} output.js (main) 362 bytes >{0}< >{1}< >{3}< >{4}< >{2}< [entry] [rendered] +chunk {7} output.js (main) 362 bytes >{0}< >{1}< >{2}< >{3}< >{4}< [entry] [rendered] > .\example.js main [2] ./example.js 362 bytes {7} [built] single entry .\example.js main diff --git a/examples/extra-async-chunk/README.md b/examples/extra-async-chunk/README.md index 3fc63aba0..db22c4dce 100644 --- a/examples/extra-async-chunk/README.md +++ b/examples/extra-async-chunk/README.md @@ -324,16 +324,16 @@ module.exports = "c"; ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names 0.output.js 405 bytes 0 [emitted] 1.output.js 241 bytes 1 [emitted] 2.output.js 241 bytes 2 [emitted] - output.js 7.31 KiB 3 [emitted] main + output.js 7.32 KiB 3 [emitted] main Entrypoint main = output.js chunk {0} 0.output.js 42 bytes <{3}> ={1}= ={2}= [rendered] split chunk (cache group: default) - > [2] ./example.js 5:0-8:2 > ./a ./b ./c [2] ./example.js 2:0-30 + > [2] ./example.js 5:0-8:2 [0] ./b.js 21 bytes {0} [built] amd require ./b [2] ./example.js 2:0-30 cjs require ./b [2] ./example.js 6:1-15 @@ -348,9 +348,9 @@ chunk {2} 2.output.js 21 bytes <{3}> ={0}= [rendered] > ./a ./b ./c [2] ./example.js 2:0-30 [4] ./c.js 21 bytes {2} [built] amd require ./c [2] ./example.js 2:0-30 -chunk {3} output.js (main) 164 bytes >{0}< >{1}< >{2}< [entry] [rendered] +chunk {3} output.js (main) 172 bytes >{0}< >{1}< >{2}< [entry] [rendered] > .\example.js main - [2] ./example.js 164 bytes {3} [built] + [2] ./example.js 172 bytes {3} [built] single entry .\example.js main ``` @@ -358,7 +358,7 @@ chunk {3} output.js (main) 164 bytes >{0}< >{1}< >{2}< [entry] [rendered] ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names 0.output.js 118 bytes 0 [emitted] 1.output.js 91 bytes 1 [emitted] @@ -366,8 +366,8 @@ Version: webpack 4.0.0-beta.1 output.js 1.73 KiB 3 [emitted] main Entrypoint main = output.js chunk {0} 0.output.js 42 bytes <{3}> ={1}= ={2}= [rendered] split chunk (cache group: default) - > [2] ./example.js 5:0-8:2 > ./a ./b ./c [2] ./example.js 2:0-30 + > [2] ./example.js 5:0-8:2 [0] ./b.js 21 bytes {0} [built] amd require ./b [2] ./example.js 2:0-30 cjs require ./b [2] ./example.js 6:1-15 @@ -382,8 +382,8 @@ chunk {2} 2.output.js 21 bytes <{3}> ={0}= [rendered] > ./a ./b ./c [2] ./example.js 2:0-30 [4] ./c.js 21 bytes {2} [built] amd require ./c [2] ./example.js 2:0-30 -chunk {3} output.js (main) 164 bytes >{0}< >{1}< >{2}< [entry] [rendered] +chunk {3} output.js (main) 172 bytes >{0}< >{1}< >{2}< [entry] [rendered] > .\example.js main - [2] ./example.js 164 bytes {3} [built] + [2] ./example.js 172 bytes {3} [built] single entry .\example.js main ``` diff --git a/examples/harmony-interop/README.md b/examples/harmony-interop/README.md index 6010d4e84..bb1814910 100644 --- a/examples/harmony-interop/README.md +++ b/examples/harmony-interop/README.md @@ -260,7 +260,7 @@ var named = "named"; ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names output.js 6.13 KiB 0 [emitted] main Entrypoint main = output.js @@ -292,7 +292,7 @@ chunk {0} output.js (main) 1.17 KiB [entry] [rendered] ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names output.js 993 bytes 0 [emitted] main Entrypoint main = output.js diff --git a/examples/harmony-library/README.md b/examples/harmony-library/README.md index 50706d30d..cabdb6e89 100644 --- a/examples/harmony-library/README.md +++ b/examples/harmony-library/README.md @@ -137,7 +137,7 @@ function increment() { ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names MyLibrary.umd.js 3.56 KiB 0 [emitted] main Entrypoint main = MyLibrary.umd.js @@ -152,7 +152,7 @@ chunk {0} MyLibrary.umd.js (main) 97 bytes [entry] [rendered] ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names MyLibrary.umd.js 926 bytes 0 [emitted] main Entrypoint main = MyLibrary.umd.js diff --git a/examples/harmony-unused/README.md b/examples/harmony-unused/README.md index 7bf8127e6..d6fce48e2 100644 --- a/examples/harmony-unused/README.md +++ b/examples/harmony-unused/README.md @@ -240,7 +240,7 @@ function c() { console.log("c"); } ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names output.js 5.93 KiB 0 [emitted] main Entrypoint main = output.js @@ -272,7 +272,7 @@ chunk {0} output.js (main) 726 bytes [entry] [rendered] ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names output.js 971 bytes 0 [emitted] main Entrypoint main = output.js diff --git a/examples/harmony/README.md b/examples/harmony/README.md index f678c0829..7108d2680 100644 --- a/examples/harmony/README.md +++ b/examples/harmony/README.md @@ -274,7 +274,7 @@ __webpack_require__.e(/*! import() */ 0).then(__webpack_require__.bind(null, /*! ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names 0.output.js 479 bytes 0 [emitted] output.js 8.27 KiB 1 [emitted] main @@ -303,7 +303,7 @@ chunk {1} output.js (main) 419 bytes >{0}< [entry] [rendered] ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names 0.output.js 144 bytes 0 [emitted] output.js 1.75 KiB 1 [emitted] main diff --git a/examples/http2-aggressive-splitting/README.md b/examples/http2-aggressive-splitting/README.md index c19637462..efafe6b28 100644 --- a/examples/http2-aggressive-splitting/README.md +++ b/examples/http2-aggressive-splitting/README.md @@ -47,7 +47,7 @@ module.exports = { ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names aae9c6dac629dd3f112e.js 54.5 KiB 7 [emitted] 07ed7b2dfa6fe5502719.js 34.8 KiB 0 [emitted] @@ -65,50 +65,50 @@ ee6461bbec846ab2c762.js 37.6 KiB 10 [emitted] 5ec04d5529f6b78241e2.js 51.9 KiB 13 [emitted] 38a6975540caa0156886.js 51.3 KiB 14 [emitted] Entrypoint main = bc5ed8b126130fde4f42.js 2a784b823ab0da1e0293.js 07ed7b2dfa6fe5502719.js -chunk {0} 07ed7b2dfa6fe5502719.js 28.3 KiB ={3}= ={5}= >{2}< >{4}< >{6}< >{7}< >{8}< >{9}< >{10}< >{11}< >{12}< >{13}< >{14}< >{1}< [entry] [rendered] +chunk {0} 07ed7b2dfa6fe5502719.js 28.3 KiB ={3}= ={5}= >{1}< >{10}< >{11}< >{12}< >{13}< >{14}< >{2}< >{4}< >{6}< >{7}< >{8}< >{9}< [entry] [rendered] > ./example main [0] ./example.js 44 bytes {0} [built] + 13 hidden modules -chunk {1} 3147c249192926fa3521.js 24.9 KiB <{3}> <{5}> <{0}> ={2}= ={4}= ={6}= ={7}= ={8}= ={9}= ={10}= ={11}= ={12}= ={13}= ={14}= [rendered] +chunk {1} 3147c249192926fa3521.js 24.9 KiB <{0}> <{3}> <{5}> ={10}= ={11}= ={12}= ={13}= ={14}= ={2}= ={4}= ={6}= ={7}= ={8}= ={9}= [rendered] > react-dom [0] ./example.js 2:0-22 3 modules -chunk {2} 987f929f287f8a6c88ac.js 45.7 KiB <{3}> <{5}> <{0}> ={4}= ={6}= ={7}= ={8}= ={9}= ={10}= ={11}= ={12}= ={13}= ={14}= ={1}= [rendered] [recorded] aggressive splitted +chunk {2} 987f929f287f8a6c88ac.js 45.7 KiB <{0}> <{3}> <{5}> ={1}= ={10}= ={11}= ={12}= ={13}= ={14}= ={4}= ={6}= ={7}= ={8}= ={9}= [rendered] [recorded] aggressive splitted > react-dom [0] ./example.js 2:0-22 23 modules -chunk {3} bc5ed8b126130fde4f42.js 37.8 KiB ={5}= ={0}= >{2}< >{4}< >{6}< >{7}< >{8}< >{9}< >{10}< >{11}< >{12}< >{13}< >{14}< >{1}< [initial] [rendered] [recorded] aggressive splitted +chunk {3} bc5ed8b126130fde4f42.js 37.8 KiB ={0}= ={5}= >{1}< >{10}< >{11}< >{12}< >{13}< >{14}< >{2}< >{4}< >{6}< >{7}< >{8}< >{9}< [initial] [rendered] [recorded] aggressive splitted > ./example main 8 modules -chunk {4} 511009f3a8f06b7c54cb.js 46.9 KiB <{3}> <{5}> <{0}> ={2}= ={6}= ={7}= ={8}= ={9}= ={10}= ={11}= ={12}= ={13}= ={14}= ={1}= [rendered] [recorded] aggressive splitted +chunk {4} 511009f3a8f06b7c54cb.js 46.9 KiB <{0}> <{3}> <{5}> ={1}= ={10}= ={11}= ={12}= ={13}= ={14}= ={2}= ={6}= ={7}= ={8}= ={9}= [rendered] [recorded] aggressive splitted > react-dom [0] ./example.js 2:0-22 8 modules -chunk {5} 2a784b823ab0da1e0293.js 45.7 KiB ={3}= ={0}= >{2}< >{4}< >{6}< >{7}< >{8}< >{9}< >{10}< >{11}< >{12}< >{13}< >{14}< >{1}< [initial] [rendered] [recorded] aggressive splitted +chunk {5} 2a784b823ab0da1e0293.js 45.7 KiB ={0}= ={3}= >{1}< >{10}< >{11}< >{12}< >{13}< >{14}< >{2}< >{4}< >{6}< >{7}< >{8}< >{9}< [initial] [rendered] [recorded] aggressive splitted > ./example main 9 modules -chunk {6} 0abfd767d2250ac9265a.js 46.3 KiB <{3}> <{5}> <{0}> ={2}= ={4}= ={7}= ={8}= ={9}= ={10}= ={11}= ={12}= ={13}= ={14}= ={1}= [rendered] [recorded] aggressive splitted +chunk {6} 0abfd767d2250ac9265a.js 46.3 KiB <{0}> <{3}> <{5}> ={1}= ={10}= ={11}= ={12}= ={13}= ={14}= ={2}= ={4}= ={7}= ={8}= ={9}= [rendered] [recorded] aggressive splitted > react-dom [0] ./example.js 2:0-22 10 modules -chunk {7} aae9c6dac629dd3f112e.js 62.3 KiB <{3}> <{5}> <{0}> ={2}= ={4}= ={6}= ={8}= ={9}= ={10}= ={11}= ={12}= ={13}= ={14}= ={1}= [rendered] [recorded] aggressive splitted +chunk {7} aae9c6dac629dd3f112e.js 62.3 KiB <{0}> <{3}> <{5}> ={1}= ={10}= ={11}= ={12}= ={13}= ={14}= ={2}= ={4}= ={6}= ={8}= ={9}= [rendered] [recorded] aggressive splitted > react-dom [0] ./example.js 2:0-22 7 modules -chunk {8} cd98376ec90f2e366b94.js 43.3 KiB <{3}> <{5}> <{0}> ={2}= ={4}= ={6}= ={7}= ={9}= ={10}= ={11}= ={12}= ={13}= ={14}= ={1}= [rendered] [recorded] aggressive splitted +chunk {8} cd98376ec90f2e366b94.js 43.3 KiB <{0}> <{3}> <{5}> ={1}= ={10}= ={11}= ={12}= ={13}= ={14}= ={2}= ={4}= ={6}= ={7}= ={9}= [rendered] [recorded] aggressive splitted > react-dom [0] ./example.js 2:0-22 3 modules -chunk {9} a0f973cb054f411fba45.js 44.4 KiB <{3}> <{5}> <{0}> ={2}= ={4}= ={6}= ={7}= ={8}= ={10}= ={11}= ={12}= ={13}= ={14}= ={1}= [rendered] [recorded] aggressive splitted +chunk {9} a0f973cb054f411fba45.js 44.4 KiB <{0}> <{3}> <{5}> ={1}= ={10}= ={11}= ={12}= ={13}= ={14}= ={2}= ={4}= ={6}= ={7}= ={8}= [rendered] [recorded] aggressive splitted > react-dom [0] ./example.js 2:0-22 10 modules -chunk {10} ee6461bbec846ab2c762.js 34 KiB <{3}> <{5}> <{0}> ={2}= ={4}= ={6}= ={7}= ={8}= ={9}= ={11}= ={12}= ={13}= ={14}= ={1}= [rendered] [recorded] aggressive splitted +chunk {10} ee6461bbec846ab2c762.js 34 KiB <{0}> <{3}> <{5}> ={1}= ={11}= ={12}= ={13}= ={14}= ={2}= ={4}= ={6}= ={7}= ={8}= ={9}= [rendered] [recorded] aggressive splitted > react-dom [0] ./example.js 2:0-22 16 modules -chunk {11} 74249374b007623d16bf.js 48.4 KiB <{3}> <{5}> <{0}> ={2}= ={4}= ={6}= ={7}= ={8}= ={9}= ={10}= ={12}= ={13}= ={14}= ={1}= [rendered] [recorded] aggressive splitted +chunk {11} 74249374b007623d16bf.js 48.4 KiB <{0}> <{3}> <{5}> ={1}= ={10}= ={12}= ={13}= ={14}= ={2}= ={4}= ={6}= ={7}= ={8}= ={9}= [rendered] [recorded] aggressive splitted > react-dom [0] ./example.js 2:0-22 6 modules -chunk {12} 0a6d10836900825087ce.js 46.2 KiB <{3}> <{5}> <{0}> ={2}= ={4}= ={6}= ={7}= ={8}= ={9}= ={10}= ={11}= ={13}= ={14}= ={1}= [rendered] [recorded] aggressive splitted +chunk {12} 0a6d10836900825087ce.js 46.2 KiB <{0}> <{3}> <{5}> ={1}= ={10}= ={11}= ={13}= ={14}= ={2}= ={4}= ={6}= ={7}= ={8}= ={9}= [rendered] [recorded] aggressive splitted > react-dom [0] ./example.js 2:0-22 9 modules -chunk {13} 5ec04d5529f6b78241e2.js 48.2 KiB <{3}> <{5}> <{0}> ={2}= ={4}= ={6}= ={7}= ={8}= ={9}= ={10}= ={11}= ={12}= ={14}= ={1}= [rendered] [recorded] aggressive splitted +chunk {13} 5ec04d5529f6b78241e2.js 48.2 KiB <{0}> <{3}> <{5}> ={1}= ={10}= ={11}= ={12}= ={14}= ={2}= ={4}= ={6}= ={7}= ={8}= ={9}= [rendered] [recorded] aggressive splitted > react-dom [0] ./example.js 2:0-22 20 modules -chunk {14} 38a6975540caa0156886.js 46.6 KiB <{3}> <{5}> <{0}> ={2}= ={4}= ={6}= ={7}= ={8}= ={9}= ={10}= ={11}= ={12}= ={13}= ={1}= [rendered] [recorded] aggressive splitted +chunk {14} 38a6975540caa0156886.js 46.6 KiB <{0}> <{3}> <{5}> ={1}= ={10}= ={11}= ={12}= ={13}= ={2}= ={4}= ={6}= ={7}= ={8}= ={9}= [rendered] [recorded] aggressive splitted > react-dom [0] ./example.js 2:0-22 24 modules ``` @@ -117,7 +117,7 @@ chunk {14} 38a6975540caa0156886.js 46.6 KiB <{3}> <{5}> <{0}> ={2}= ={4}= ={6} ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names 7a1ec67d9e4e1019836a.js 14.8 KiB 7 [emitted] 9baaf7bc0364c2600ef8.js 9.7 KiB 0 [emitted] @@ -135,49 +135,49 @@ f9403b4474b02c436f23.js 10.9 KiB 12 [emitted] 97ad3a6439b7ef8470ec.js 6.41 KiB 13 [emitted] ed199e2ef66607136e6a.js 5.97 KiB 14 [emitted] Entrypoint main = 97ad3a6439b7ef8470ec.js f9403b4474b02c436f23.js ed199e2ef66607136e6a.js -chunk {0} 9baaf7bc0364c2600ef8.js 46.6 KiB <{13}> <{12}> <{14}> ={10}= ={9}= ={8}= ={7}= ={6}= ={5}= ={4}= ={3}= ={2}= ={1}= ={11}= [rendered] [recorded] aggressive splitted +chunk {0} 9baaf7bc0364c2600ef8.js 46.6 KiB <{12}> <{13}> <{14}> ={1}= ={10}= ={11}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={8}= ={9}= [rendered] [recorded] aggressive splitted > react-dom [30] ./example.js 2:0-22 24 modules -chunk {1} 148bbb5ef8fd203f5c99.js 48.2 KiB <{13}> <{12}> <{14}> ={10}= ={9}= ={8}= ={7}= ={6}= ={5}= ={4}= ={3}= ={2}= ={0}= ={11}= [rendered] [recorded] aggressive splitted +chunk {1} 148bbb5ef8fd203f5c99.js 48.2 KiB <{12}> <{13}> <{14}> ={0}= ={10}= ={11}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={8}= ={9}= [rendered] [recorded] aggressive splitted > react-dom [30] ./example.js 2:0-22 20 modules -chunk {2} cf3beff30352265c3fae.js 46.2 KiB <{13}> <{12}> <{14}> ={10}= ={9}= ={8}= ={7}= ={6}= ={5}= ={4}= ={3}= ={1}= ={0}= ={11}= [rendered] [recorded] aggressive splitted +chunk {2} cf3beff30352265c3fae.js 46.2 KiB <{12}> <{13}> <{14}> ={0}= ={1}= ={10}= ={11}= ={3}= ={4}= ={5}= ={6}= ={7}= ={8}= ={9}= [rendered] [recorded] aggressive splitted > react-dom [30] ./example.js 2:0-22 9 modules -chunk {3} 0bc9e49d2884c20a78ae.js 48.4 KiB <{13}> <{12}> <{14}> ={10}= ={9}= ={8}= ={7}= ={6}= ={5}= ={4}= ={2}= ={1}= ={0}= ={11}= [rendered] [recorded] aggressive splitted +chunk {3} 0bc9e49d2884c20a78ae.js 48.4 KiB <{12}> <{13}> <{14}> ={0}= ={1}= ={10}= ={11}= ={2}= ={4}= ={5}= ={6}= ={7}= ={8}= ={9}= [rendered] [recorded] aggressive splitted > react-dom [30] ./example.js 2:0-22 6 modules -chunk {4} 408e20e95f946dedfdd3.js 34 KiB <{13}> <{12}> <{14}> ={10}= ={9}= ={8}= ={7}= ={6}= ={5}= ={3}= ={2}= ={1}= ={0}= ={11}= [rendered] [recorded] aggressive splitted +chunk {4} 408e20e95f946dedfdd3.js 34 KiB <{12}> <{13}> <{14}> ={0}= ={1}= ={10}= ={11}= ={2}= ={3}= ={5}= ={6}= ={7}= ={8}= ={9}= [rendered] [recorded] aggressive splitted > react-dom [30] ./example.js 2:0-22 16 modules -chunk {5} 5b44ef86854beead5c79.js 44.4 KiB <{13}> <{12}> <{14}> ={10}= ={9}= ={8}= ={7}= ={6}= ={4}= ={3}= ={2}= ={1}= ={0}= ={11}= [rendered] [recorded] aggressive splitted +chunk {5} 5b44ef86854beead5c79.js 44.4 KiB <{12}> <{13}> <{14}> ={0}= ={1}= ={10}= ={11}= ={2}= ={3}= ={4}= ={6}= ={7}= ={8}= ={9}= [rendered] [recorded] aggressive splitted > react-dom [30] ./example.js 2:0-22 10 modules -chunk {6} 2d761db260e810943d04.js 43.3 KiB <{13}> <{12}> <{14}> ={10}= ={9}= ={8}= ={7}= ={5}= ={4}= ={3}= ={2}= ={1}= ={0}= ={11}= [rendered] [recorded] aggressive splitted +chunk {6} 2d761db260e810943d04.js 43.3 KiB <{12}> <{13}> <{14}> ={0}= ={1}= ={10}= ={11}= ={2}= ={3}= ={4}= ={5}= ={7}= ={8}= ={9}= [rendered] [recorded] aggressive splitted > react-dom [30] ./example.js 2:0-22 3 modules -chunk {7} 7a1ec67d9e4e1019836a.js 62.3 KiB <{13}> <{12}> <{14}> ={10}= ={9}= ={8}= ={6}= ={5}= ={4}= ={3}= ={2}= ={1}= ={0}= ={11}= [rendered] [recorded] aggressive splitted +chunk {7} 7a1ec67d9e4e1019836a.js 62.3 KiB <{12}> <{13}> <{14}> ={0}= ={1}= ={10}= ={11}= ={2}= ={3}= ={4}= ={5}= ={6}= ={8}= ={9}= [rendered] [recorded] aggressive splitted > react-dom [30] ./example.js 2:0-22 7 modules -chunk {8} 5efec1104bcbe14efad9.js 46.3 KiB <{13}> <{12}> <{14}> ={10}= ={9}= ={7}= ={6}= ={5}= ={4}= ={3}= ={2}= ={1}= ={0}= ={11}= [rendered] [recorded] aggressive splitted +chunk {8} 5efec1104bcbe14efad9.js 46.3 KiB <{12}> <{13}> <{14}> ={0}= ={1}= ={10}= ={11}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={9}= [rendered] [recorded] aggressive splitted > react-dom [30] ./example.js 2:0-22 10 modules -chunk {9} 050d4b543b70cc78b255.js 46.9 KiB <{13}> <{12}> <{14}> ={10}= ={8}= ={7}= ={6}= ={5}= ={4}= ={3}= ={2}= ={1}= ={0}= ={11}= [rendered] [recorded] aggressive splitted +chunk {9} 050d4b543b70cc78b255.js 46.9 KiB <{12}> <{13}> <{14}> ={0}= ={1}= ={10}= ={11}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={8}= [rendered] [recorded] aggressive splitted > react-dom [30] ./example.js 2:0-22 8 modules -chunk {10} 2c42126f0455b98de2d0.js 45.7 KiB <{13}> <{12}> <{14}> ={9}= ={8}= ={7}= ={6}= ={5}= ={4}= ={3}= ={2}= ={1}= ={0}= ={11}= [rendered] [recorded] aggressive splitted +chunk {10} 2c42126f0455b98de2d0.js 45.7 KiB <{12}> <{13}> <{14}> ={0}= ={1}= ={11}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={8}= ={9}= [rendered] [recorded] aggressive splitted > react-dom [30] ./example.js 2:0-22 23 modules -chunk {11} 27d8a7d99dbd33243169.js 24.9 KiB <{13}> <{12}> <{14}> ={10}= ={9}= ={8}= ={7}= ={6}= ={5}= ={4}= ={3}= ={2}= ={1}= ={0}= [rendered] +chunk {11} 27d8a7d99dbd33243169.js 24.9 KiB <{12}> <{13}> <{14}> ={0}= ={1}= ={10}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={8}= ={9}= [rendered] > react-dom [30] ./example.js 2:0-22 3 modules -chunk {12} f9403b4474b02c436f23.js 45.7 KiB ={13}= ={14}= >{10}< >{9}< >{8}< >{7}< >{6}< >{5}< >{4}< >{3}< >{2}< >{1}< >{0}< >{11}< [initial] [rendered] [recorded] aggressive splitted +chunk {12} f9403b4474b02c436f23.js 45.7 KiB ={13}= ={14}= >{0}< >{1}< >{10}< >{11}< >{2}< >{3}< >{4}< >{5}< >{6}< >{7}< >{8}< >{9}< [initial] [rendered] [recorded] aggressive splitted > ./example main 9 modules -chunk {13} 97ad3a6439b7ef8470ec.js 37.8 KiB ={12}= ={14}= >{10}< >{9}< >{8}< >{7}< >{6}< >{5}< >{4}< >{3}< >{2}< >{1}< >{0}< >{11}< [initial] [rendered] [recorded] aggressive splitted +chunk {13} 97ad3a6439b7ef8470ec.js 37.8 KiB ={12}= ={14}= >{0}< >{1}< >{10}< >{11}< >{2}< >{3}< >{4}< >{5}< >{6}< >{7}< >{8}< >{9}< [initial] [rendered] [recorded] aggressive splitted > ./example main 8 modules -chunk {14} ed199e2ef66607136e6a.js 28.3 KiB ={13}= ={12}= >{10}< >{9}< >{8}< >{7}< >{6}< >{5}< >{4}< >{3}< >{2}< >{1}< >{0}< >{11}< [entry] [rendered] +chunk {14} ed199e2ef66607136e6a.js 28.3 KiB ={12}= ={13}= >{0}< >{1}< >{10}< >{11}< >{2}< >{3}< >{4}< >{5}< >{6}< >{7}< >{8}< >{9}< [entry] [rendered] > ./example main [30] ./example.js 44 bytes {14} [built] + 13 hidden modules diff --git a/examples/hybrid-routing/README.md b/examples/hybrid-routing/README.md index 389106798..de9402a01 100644 --- a/examples/hybrid-routing/README.md +++ b/examples/hybrid-routing/README.md @@ -369,7 +369,7 @@ module.exports = webpackAsyncContext; /******/ /******/ /******/ // add entry module to deferred list -/******/ deferredModules.push([8,1,2]); +/******/ deferredModules.push([8,2,1]); /******/ // run deferred modules when ready /******/ return checkDeferredModules(); /******/ }) @@ -437,37 +437,37 @@ module.exports = function() { ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names bPage.chunk.js 299 bytes 0 [emitted] bPage aPage.chunk.js 293 bytes 1 [emitted] aPage -pageA~pageB.chunk.js 2.14 KiB 2 [emitted] pageA~pageB +pageA~pageB.chunk.js 2.16 KiB 2 [emitted] pageA~pageB pageB.bundle.js 8.2 KiB 3 [emitted] pageB pageA.bundle.js 8.2 KiB 4 [emitted] pageA -Entrypoint pageA = aPage.chunk.js pageA~pageB.chunk.js pageA.bundle.js -Entrypoint pageB = bPage.chunk.js pageA~pageB.chunk.js pageB.bundle.js +Entrypoint pageA = pageA~pageB.chunk.js aPage.chunk.js pageA.bundle.js +Entrypoint pageB = pageA~pageB.chunk.js bPage.chunk.js pageB.bundle.js chunk {0} bPage.chunk.js (bPage) 61 bytes <{1}> <{2}> <{4}> ={2}= ={3}= >{1}< [initial] [rendered] reused as split chunk (cache group: default) - > ./bPage [6] . lazy ^\.\/.*Page$ namespace object ./bPage - > ./bPage [6] . lazy ^\.\/.*Page$ namespace object ./bPage > pageB + > ./bPage [6] . lazy ^\.\/.*Page$ namespace object ./bPage + > ./bPage [6] . lazy ^\.\/.*Page$ namespace object ./bPage [1] ./bPage.js 61 bytes {0} [built] cjs require ./bPage [4] ./bEntry.js 3:7-25 context element ./bPage [6] . lazy ^\.\/.*Page$ namespace object ./bPage chunk {1} aPage.chunk.js (aPage) 61 bytes <{0}> <{2}> <{3}> ={2}= ={4}= >{0}< [initial] [rendered] reused as split chunk (cache group: default) - > ./aPage [6] . lazy ^\.\/.*Page$ namespace object ./aPage - > ./aPage [6] . lazy ^\.\/.*Page$ namespace object ./aPage > pageA + > ./aPage [6] . lazy ^\.\/.*Page$ namespace object ./aPage + > ./aPage [6] . lazy ^\.\/.*Page$ namespace object ./aPage [3] ./aPage.js 61 bytes {1} [built] context element ./aPage [6] . lazy ^\.\/.*Page$ namespace object ./aPage cjs require ./aPage [7] ./aEntry.js 3:7-25 -chunk {2} pageA~pageB.chunk.js (pageA~pageB) 952 bytes ={0}= ={3}= ={1}= ={4}= >{1}< >{0}< [initial] [rendered] split chunk (cache group: default) (name: pageA~pageB) - > pageB +chunk {2} pageA~pageB.chunk.js (pageA~pageB) 970 bytes ={0}= ={1}= ={3}= ={4}= >{0}< >{1}< [initial] [rendered] split chunk (cache group: default) (name: pageA~pageB) > pageA + > pageB [0] ./render.js 60 bytes {2} [built] cjs require ./render [2] ./router.js 1:13-32 cjs require ./render [4] ./bEntry.js 2:13-32 cjs require ./render [7] ./aEntry.js 2:13-32 - [2] ./router.js 732 bytes {2} [built] + [2] ./router.js 750 bytes {2} [built] single entry ./router [5] multi ./bEntry ./router pageB:100001 single entry ./router [8] multi ./aEntry ./router pageA:100001 [6] . lazy ^\.\/.*Page$ namespace object 160 bytes {2} [built] @@ -490,37 +490,37 @@ chunk {4} pageA.bundle.js (pageA) 129 bytes ={1}= ={2}= >{0}< [entry] [render ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names bPage.chunk.js 122 bytes 0 [emitted] bPage aPage.chunk.js 123 bytes 1 [emitted] aPage pageA~pageB.chunk.js 589 bytes 2 [emitted] pageA~pageB pageB.bundle.js 1.85 KiB 3 [emitted] pageB pageA.bundle.js 1.85 KiB 4 [emitted] pageA -Entrypoint pageA = aPage.chunk.js pageA~pageB.chunk.js pageA.bundle.js -Entrypoint pageB = bPage.chunk.js pageA~pageB.chunk.js pageB.bundle.js +Entrypoint pageA = pageA~pageB.chunk.js aPage.chunk.js pageA.bundle.js +Entrypoint pageB = pageA~pageB.chunk.js bPage.chunk.js pageB.bundle.js chunk {0} bPage.chunk.js (bPage) 61 bytes <{1}> <{2}> <{4}> ={2}= ={3}= >{1}< [initial] [rendered] reused as split chunk (cache group: default) - > ./bPage [6] . lazy ^\.\/.*Page$ namespace object ./bPage - > ./bPage [6] . lazy ^\.\/.*Page$ namespace object ./bPage > pageB + > ./bPage [6] . lazy ^\.\/.*Page$ namespace object ./bPage + > ./bPage [6] . lazy ^\.\/.*Page$ namespace object ./bPage [1] ./bPage.js 61 bytes {0} [built] cjs require ./bPage [4] ./bEntry.js 3:7-25 context element ./bPage [6] . lazy ^\.\/.*Page$ namespace object ./bPage chunk {1} aPage.chunk.js (aPage) 61 bytes <{0}> <{2}> <{3}> ={2}= ={4}= >{0}< [initial] [rendered] reused as split chunk (cache group: default) - > ./aPage [6] . lazy ^\.\/.*Page$ namespace object ./aPage - > ./aPage [6] . lazy ^\.\/.*Page$ namespace object ./aPage > pageA + > ./aPage [6] . lazy ^\.\/.*Page$ namespace object ./aPage + > ./aPage [6] . lazy ^\.\/.*Page$ namespace object ./aPage [3] ./aPage.js 61 bytes {1} [built] context element ./aPage [6] . lazy ^\.\/.*Page$ namespace object ./aPage cjs require ./aPage [7] ./aEntry.js 3:7-25 -chunk {2} pageA~pageB.chunk.js (pageA~pageB) 952 bytes ={0}= ={3}= ={1}= ={4}= >{1}< >{0}< [initial] [rendered] split chunk (cache group: default) (name: pageA~pageB) - > pageB +chunk {2} pageA~pageB.chunk.js (pageA~pageB) 970 bytes ={0}= ={1}= ={3}= ={4}= >{0}< >{1}< [initial] [rendered] split chunk (cache group: default) (name: pageA~pageB) > pageA + > pageB [0] ./render.js 60 bytes {2} [built] cjs require ./render [2] ./router.js 1:13-32 cjs require ./render [4] ./bEntry.js 2:13-32 cjs require ./render [7] ./aEntry.js 2:13-32 - [2] ./router.js 732 bytes {2} [built] + [2] ./router.js 750 bytes {2} [built] single entry ./router [5] multi ./bEntry ./router pageB:100001 single entry ./router [8] multi ./aEntry ./router pageA:100001 [6] . lazy ^\.\/.*Page$ namespace object 160 bytes {2} [built] diff --git a/examples/i18n/README.md b/examples/i18n/README.md index e545fec93..70d3e3d4e 100644 --- a/examples/i18n/README.md +++ b/examples/i18n/README.md @@ -238,7 +238,7 @@ console.log("Missing Text"); ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Child en: Hash: 0a1b2c3d4e5f6a7b8c9d Asset Size Chunks Chunk Names @@ -266,7 +266,7 @@ Child de: ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Child en: Hash: 0a1b2c3d4e5f6a7b8c9d Asset Size Chunks Chunk Names diff --git a/examples/loader/README.md b/examples/loader/README.md index 03a8e9831..ca02180df 100644 --- a/examples/loader/README.md +++ b/examples/loader/README.md @@ -263,7 +263,7 @@ Prints in node.js (`enhanced-require example.js`) and in browser: ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names output.js 6.2 KiB 0 [emitted] main Entrypoint main = output.js @@ -283,7 +283,7 @@ chunk {0} output.js (main) 2.66 KiB [entry] [rendered] ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names output.js 1.53 KiB 0 [emitted] main Entrypoint main = output.js diff --git a/examples/mixed/README.md b/examples/mixed/README.md index 0a4ed616b..1a49a5ef7 100644 --- a/examples/mixed/README.md +++ b/examples/mixed/README.md @@ -409,7 +409,7 @@ module.exports = function() { ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names 0.output.js 1.87 KiB 0 [emitted] output.js 9.76 KiB 1 [emitted] main @@ -455,7 +455,7 @@ chunk {1} output.js (main) 1.03 KiB >{0}< [entry] [rendered] ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names 0.output.js 606 bytes 0 [emitted] output.js 2.04 KiB 1 [emitted] main diff --git a/examples/multi-compiler/README.md b/examples/multi-compiler/README.md index 2bcd38ede..f78825652 100644 --- a/examples/multi-compiler/README.md +++ b/examples/multi-compiler/README.md @@ -251,7 +251,7 @@ console.log("Running " + "mobile" + " build"); ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Child mobile: Hash: 0a1b2c3d4e5f6a7b8c9d Asset Size Chunks Chunk Names @@ -278,7 +278,7 @@ Child desktop: ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Child mobile: Hash: 0a1b2c3d4e5f6a7b8c9d Asset Size Chunks Chunk Names diff --git a/examples/multi-part-library/README.md b/examples/multi-part-library/README.md index 87f89df74..22cd42401 100644 --- a/examples/multi-part-library/README.md +++ b/examples/multi-part-library/README.md @@ -245,7 +245,7 @@ module.exports = "beta"; ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names MyLibrary.alpha.js 3.16 KiB 0 [emitted] alpha MyLibrary.beta.js 3.16 KiB 1 [emitted] beta @@ -265,7 +265,7 @@ chunk {1} MyLibrary.beta.js (beta) 24 bytes [entry] [rendered] ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names MyLibrary.beta.js 828 bytes 0 [emitted] beta MyLibrary.alpha.js 832 bytes 1 [emitted] alpha diff --git a/examples/multiple-entry-points/README.md b/examples/multiple-entry-points/README.md index 373188d3f..ff024dbfb 100644 --- a/examples/multiple-entry-points/README.md +++ b/examples/multiple-entry-points/README.md @@ -572,7 +572,7 @@ module.exports = function(msg) { ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names 0.js 363 bytes 0 [emitted] commons.js 267 bytes 1 [emitted] commons @@ -588,8 +588,8 @@ chunk {0} 0.js 91 bytes <{1}> <{2}> <{3}> [rendered] cjs require ./shared [2] ./pageB.js 3:14-33 amd require ./shared [3] ./pageA.js 2:0-4:2 chunk {1} commons.js (commons) 26 bytes ={2}= ={3}= >{0}< [initial] [rendered] split chunk (cache group: commons) (name: commons) - > ./pageB pageB > ./pageA pageA + > ./pageB pageB [1] ./common.js 26 bytes {1} [built] cjs require ./common [0] ./shared.js 1:13-32 cjs require ./common [2] ./pageB.js 1:13-32 @@ -608,7 +608,7 @@ chunk {3} pageA.js (pageA) 108 bytes ={1}= >{0}< [entry] [rendered] ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names 0.js 120 bytes 0 [emitted] commons.js 95 bytes 1 [emitted] commons @@ -624,8 +624,8 @@ chunk {0} 0.js 91 bytes <{1}> <{2}> <{3}> [rendered] cjs require ./shared [2] ./pageB.js 3:14-33 amd require ./shared [3] ./pageA.js 2:0-4:2 chunk {1} commons.js (commons) 26 bytes ={2}= ={3}= >{0}< [initial] [rendered] split chunk (cache group: commons) (name: commons) - > ./pageB pageB > ./pageA pageA + > ./pageB pageB [1] ./common.js 26 bytes {1} [built] cjs require ./common [0] ./shared.js 1:13-32 cjs require ./common [2] ./pageB.js 1:13-32 diff --git a/examples/named-chunks/README.md b/examples/named-chunks/README.md index c3985553e..39ce76522 100644 --- a/examples/named-chunks/README.md +++ b/examples/named-chunks/README.md @@ -326,7 +326,7 @@ __webpack_require__.e(/*! require.ensure */ 0).then((function(require) { ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names 0.output.js 463 bytes 0 [emitted] 1.output.js 677 bytes 1 [emitted] my own chunk @@ -336,9 +336,9 @@ chunk {0} 0.output.js 22 bytes <{2}> [rendered] > [3] ./example.js 17:0-20:2 2 modules chunk {1} 1.output.js (my own chunk) 33 bytes <{2}> [rendered] + > [3] ./example.js 13:0-15:18 > [3] ./example.js 3:0-6:18 > [3] ./example.js 8:0-11:18 - > [3] ./example.js 13:0-15:18 3 modules chunk {2} output.js (main) 452 bytes >{0}< >{1}< [entry] [rendered] > .\example.js main @@ -351,7 +351,7 @@ chunk {2} output.js (main) 452 bytes >{0}< >{1}< [entry] [rendered] ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names 0.output.js 92 bytes 0 [emitted] 1.output.js 112 bytes 1, 0 [emitted] my own chunk @@ -361,9 +361,9 @@ chunk {0} 0.output.js 22 bytes <{2}> [rendered] > [3] ./example.js 17:0-20:2 2 modules chunk {1} 1.output.js (my own chunk) 33 bytes <{2}> [rendered] + > [3] ./example.js 13:0-15:18 > [3] ./example.js 3:0-6:18 > [3] ./example.js 8:0-11:18 - > [3] ./example.js 13:0-15:18 3 modules chunk {2} output.js (main) 452 bytes >{0}< >{1}< [entry] [rendered] > .\example.js main diff --git a/examples/require.context/README.md b/examples/require.context/README.md index c5b5a1f7e..1fefd39aa 100644 --- a/examples/require.context/README.md +++ b/examples/require.context/README.md @@ -202,7 +202,7 @@ module.exports = function() { ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names output.js 4.48 KiB 0 [emitted] main Entrypoint main = output.js @@ -227,7 +227,7 @@ chunk {0} output.js (main) 613 bytes [entry] [rendered] ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names output.js 1.16 KiB 0 [emitted] main Entrypoint main = output.js diff --git a/examples/require.resolve/README.md b/examples/require.resolve/README.md index 82348cc88..efb35906b 100644 --- a/examples/require.resolve/README.md +++ b/examples/require.resolve/README.md @@ -146,7 +146,7 @@ module.exports = Math.random(); ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names output.js 3.26 KiB 0 [emitted] main Entrypoint main = output.js @@ -164,7 +164,7 @@ chunk {0} output.js (main) 326 bytes [entry] [rendered] ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names output.js 667 bytes 0 [emitted] main Entrypoint main = output.js diff --git a/examples/scope-hoisting/README.md b/examples/scope-hoisting/README.md index 7029f167e..24cfd34b9 100644 --- a/examples/scope-hoisting/README.md +++ b/examples/scope-hoisting/README.md @@ -439,7 +439,7 @@ Minimized ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names 0.output.js 1.78 KiB 0 [emitted] output.js 8.2 KiB 1 [emitted] main @@ -478,7 +478,7 @@ chunk {1} output.js (main) 390 bytes >{0}< [entry] [rendered] ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names 0.output.js 362 bytes 0 [emitted] output.js 1.8 KiB 1 [emitted] main diff --git a/examples/side-effects/README.md b/examples/side-effects/README.md index 510edc0bf..479224338 100644 --- a/examples/side-effects/README.md +++ b/examples/side-effects/README.md @@ -298,13 +298,13 @@ const c = "c"; ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names -output.js 7.89 KiB 0 [emitted] main +output.js 7.91 KiB 0 [emitted] main Entrypoint main = output.js -chunk {0} output.js (main) 422 bytes [entry] [rendered] +chunk {0} output.js (main) 443 bytes [entry] [rendered] > .\example.js main - [0] ./example.js 140 bytes {0} [built] + [0] ./example.js 149 bytes {0} [built] [no exports] single entry .\example.js main + 8 hidden modules @@ -314,16 +314,16 @@ chunk {0} output.js (main) 422 bytes [entry] [rendered] ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names output.js 600 bytes 0 [emitted] main Entrypoint main = output.js -chunk {0} output.js (main) 325 bytes [entry] [rendered] +chunk {0} output.js (main) 342 bytes [entry] [rendered] > .\example.js main - [0] ./example.js + 6 modules 325 bytes {0} [built] + [0] ./example.js + 6 modules 342 bytes {0} [built] [no exports] single entry .\example.js main - | ./example.js 140 bytes [built] + | ./example.js 149 bytes [built] | [no exports] | single entry .\example.js main | + 6 hidden modules diff --git a/examples/source-map/README.md b/examples/source-map/README.md index c57ffac5a..7b106ca05 100644 --- a/examples/source-map/README.md +++ b/examples/source-map/README.md @@ -239,7 +239,7 @@ eval("var math, race,\n slice = [].slice;\n\nmath = {\n root: Math.sqrt,\n sq ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Child Hash: 0a1b2c3d4e5f6a7b8c9d Asset Size Chunks Chunk Names diff --git a/examples/two-explicit-vendor-chunks/README.md b/examples/two-explicit-vendor-chunks/README.md index b3d52293d..7db74836f 100644 --- a/examples/two-explicit-vendor-chunks/README.md +++ b/examples/two-explicit-vendor-chunks/README.md @@ -373,7 +373,7 @@ __webpack_require__(/*! ./vendor2 */ 3); ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names vendor1.js 2.99 KiB 0 [emitted] vendor1 vendor2.js 3.25 KiB 1 [emitted] vendor2 @@ -429,7 +429,7 @@ chunk {4} pageC.js (pageC) 25 bytes [entry] [rendered] ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names pageC.js 569 bytes 0 [emitted] pageC pageB.js 569 bytes 1 [emitted] pageB diff --git a/examples/wasm-simple/README.md b/examples/wasm-simple/README.md index 2754f95ba..e41692c95 100644 --- a/examples/wasm-simple/README.md +++ b/examples/wasm-simple/README.md @@ -430,23 +430,23 @@ module.exports = instance.exports; ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names - 0.output.js 2.86 KiB 0 [emitted] + 0.output.js 2.88 KiB 0 [emitted] 9c8c5b45b5c12888e105.wasm 41 bytes 0, 1 [emitted] 62df68d96f4aa17e7b77.wasm 67 bytes 0 [emitted] e5003c8310987c008228.wasm 62 bytes 0 [emitted] 1.output.js 462 bytes 1 [emitted] - output.js 8.88 KiB 2 [emitted] main + output.js 8.91 KiB 2 [emitted] main Entrypoint main = output.js -chunk {0} 0.output.js, 9c8c5b45b5c12888e105.wasm, 62df68d96f4aa17e7b77.wasm, e5003c8310987c008228.wasm 570 bytes <{2}> [rendered] +chunk {0} 0.output.js, 9c8c5b45b5c12888e105.wasm, 62df68d96f4aa17e7b77.wasm, e5003c8310987c008228.wasm 585 bytes <{2}> [rendered] > ./math [0] ./example.js 3:1-17 [1] ./add.wasm 41 bytes {0} {1} [built] [exports: add] import() ./add.wasm [0] ./example.js 1:0-20 harmony side effect evaluation ./add.wasm [2] ./math.js 1:0-33 harmony export imported specifier ./add.wasm [2] ./math.js 5:0-37 - [2] ./math.js 400 bytes {0} [built] + [2] ./math.js 415 bytes {0} [built] [exports: add, factorial, fibonacci, factorialJavascript, fibonacciJavascript] import() ./math [0] ./example.js 3:1-17 [3] ./fibonacci.wasm 67 bytes {0} [built] @@ -464,9 +464,9 @@ chunk {1} 1.output.js, 9c8c5b45b5c12888e105.wasm 41 bytes <{2}> [rendered] import() ./add.wasm [0] ./example.js 1:0-20 harmony side effect evaluation ./add.wasm [2] ./math.js 1:0-33 harmony export imported specifier ./add.wasm [2] ./math.js 5:0-37 -chunk {2} output.js (main) 762 bytes >{0}< >{1}< [entry] [rendered] +chunk {2} output.js (main) 788 bytes >{0}< >{1}< [entry] [rendered] > .\example.js main - [0] ./example.js 762 bytes {2} [built] + [0] ./example.js 788 bytes {2} [built] single entry .\example.js main ``` @@ -474,7 +474,7 @@ chunk {2} output.js (main) 762 bytes >{0}< >{1}< [entry] [rendered] ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names 0.output.js 722 bytes 0, 1 [emitted] fb3978ee17c3b5162f77.wasm 41 bytes 0, 1, 1 [emitted] @@ -483,14 +483,14 @@ e231a41fda9732bd5556.wasm 62 bytes 0, 1 [emitted] 1.output.js 155 bytes 1 [emitted] output.js 2.52 KiB 2 [emitted] main Entrypoint main = output.js -chunk {0} 0.output.js, fb3978ee17c3b5162f77.wasm, 11be07941949e929b309.wasm, e231a41fda9732bd5556.wasm 570 bytes <{2}> [rendered] +chunk {0} 0.output.js, fb3978ee17c3b5162f77.wasm, 11be07941949e929b309.wasm, e231a41fda9732bd5556.wasm 585 bytes <{2}> [rendered] > ./math [0] ./example.js 3:1-17 [1] ./add.wasm 41 bytes {0} {1} [built] [exports: add] import() ./add.wasm [0] ./example.js 1:0-20 harmony side effect evaluation ./add.wasm [2] ./math.js 1:0-33 harmony export imported specifier ./add.wasm [2] ./math.js 5:0-37 - [2] ./math.js 400 bytes {0} [built] + [2] ./math.js 415 bytes {0} [built] [exports: add, factorial, fibonacci, factorialJavascript, fibonacciJavascript] import() ./math [0] ./example.js 3:1-17 [3] ./fibonacci.wasm 67 bytes {0} [built] @@ -510,8 +510,8 @@ chunk {1} 1.output.js, fb3978ee17c3b5162f77.wasm 41 bytes <{2}> [rendered] import() ./add.wasm [0] ./example.js 1:0-20 harmony side effect evaluation ./add.wasm [2] ./math.js 1:0-33 harmony export imported specifier ./add.wasm [2] ./math.js 5:0-37 -chunk {2} output.js (main) 762 bytes >{0}< >{1}< [entry] [rendered] +chunk {2} output.js (main) 788 bytes >{0}< >{1}< [entry] [rendered] > .\example.js main - [0] ./example.js 762 bytes {2} [built] + [0] ./example.js 788 bytes {2} [built] single entry .\example.js main ``` diff --git a/examples/web-worker/README.md b/examples/web-worker/README.md index 4a61cea1f..3e80483c1 100644 --- a/examples/web-worker/README.md +++ b/examples/web-worker/README.md @@ -343,17 +343,17 @@ module.exports = function() { ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names 0.hash.worker.js 1.82 KiB [emitted] hash.worker.js 4.02 KiB [emitted] output.js 3.46 KiB 0 [emitted] main Entrypoint main = output.js -chunk {0} output.js (main) 326 bytes [entry] [rendered] +chunk {0} output.js (main) 332 bytes [entry] [rendered] > .\example.js main [0] (webpack)/node_modules/worker-loader/dist/cjs.js?name=hash.worker.js!./worker.js 97 bytes {0} [not cacheable] [built] cjs require worker-loader?name=hash.worker.js!./worker [1] ./example.js 1:13-66 - [1] ./example.js 229 bytes {0} [built] + [1] ./example.js 235 bytes {0} [built] single entry .\example.js main Child worker: Asset Size Chunks Chunk Names @@ -383,17 +383,17 @@ Child worker: ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.1 +Version: webpack 4.0.0-beta.2 Asset Size Chunks Chunk Names 0.hash.worker.js 594 bytes [emitted] hash.worker.js 919 bytes [emitted] output.js 697 bytes 0 [emitted] main Entrypoint main = output.js -chunk {0} output.js (main) 326 bytes [entry] [rendered] +chunk {0} output.js (main) 332 bytes [entry] [rendered] > .\example.js main [0] (webpack)/node_modules/worker-loader/dist/cjs.js?name=hash.worker.js!./worker.js 97 bytes {0} [not cacheable] [built] cjs require worker-loader?name=hash.worker.js!./worker [1] ./example.js 1:13-66 - [1] ./example.js 229 bytes {0} [built] + [1] ./example.js 235 bytes {0} [built] single entry .\example.js main Child worker: Asset Size Chunks Chunk Names From 9cf9e3e2b32ce25955ad702154ae476a03b42f48 Mon Sep 17 00:00:00 2001 From: EugeneHlushko Date: Sun, 18 Feb 2018 13:27:46 +0200 Subject: [PATCH 093/112] Bugfix #6051: add `original-fs` to externals for electron targets --- lib/WebpackOptionsApply.js | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/lib/WebpackOptionsApply.js b/lib/WebpackOptionsApply.js index 8ef9dcda2..39ea640f9 100644 --- a/lib/WebpackOptionsApply.js +++ b/lib/WebpackOptionsApply.js @@ -138,7 +138,9 @@ class WebpackOptionsApply extends OptionsApply { "app", "auto-updater", "browser-window", + "clipboard", "content-tracing", + "crash-reporter", "dialog", "electron", "global-shortcut", @@ -146,17 +148,16 @@ class WebpackOptionsApply extends OptionsApply { "ipc-main", "menu", "menu-item", + "native-image", + "original-fs", "power-monitor", "power-save-blocker", "protocol", - "session", - "web-contents", - "tray", - "clipboard", - "crash-reporter", - "native-image", "screen", - "shell" + "session", + "shell", + "tray", + "web-contents" ]).apply(compiler); new LoaderTargetPlugin(options.target).apply(compiler); break; @@ -168,17 +169,18 @@ class WebpackOptionsApply extends OptionsApply { new FunctionModulePlugin(options.output).apply(compiler); new NodeTargetPlugin().apply(compiler); new ExternalsPlugin("commonjs", [ + "clipboard", + "crash-reporter", "desktop-capturer", "electron", "ipc", "ipc-renderer", - "remote", - "web-frame", - "clipboard", - "crash-reporter", "native-image", + "original-fs", + "remote", "screen", - "shell" + "shell", + "web-frame" ]).apply(compiler); new LoaderTargetPlugin(options.target).apply(compiler); break; From d51d8ad8f77634b3bc8ad49098e2fc49d2ebe66a Mon Sep 17 00:00:00 2001 From: buoyantair Date: Sun, 18 Feb 2018 20:44:57 +0530 Subject: [PATCH 094/112] Make gitters singular --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8d04385d6..578ea56e2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -60,4 +60,4 @@ documentation. ## Discussions -Gitters is only for small questions. To discuss in long a subject, please send on gitters a link to your forum or blog. +Gitter is only for small questions. To discuss in long a subject, please send on Gitter a link to your forum or blog. From bbb96aed5274a90241faea64d8054182b41ea500 Mon Sep 17 00:00:00 2001 From: buoyantair Date: Sun, 18 Feb 2018 20:46:12 +0530 Subject: [PATCH 095/112] Reword discussions body --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 578ea56e2..a8f50bfba 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -60,4 +60,4 @@ documentation. ## Discussions -Gitter is only for small questions. To discuss in long a subject, please send on Gitter a link to your forum or blog. +Gitter is only for small questions. To discuss a subject in detail, please send a link to your forum or blog in the Gitter chat. From 000b34e0c2a23563de9b0e862215846deb3710e7 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Mon, 19 Feb 2018 15:30:38 +0100 Subject: [PATCH 096/112] Label "send a PR" issues --- open-bot.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/open-bot.yaml b/open-bot.yaml index 579b3778a..4e2ee7c84 100644 --- a/open-bot.yaml +++ b/open-bot.yaml @@ -411,6 +411,17 @@ rules: +# add "Send a PR" label when somebody with write permission say it +- filters: + open: true + comment: "[Ss]end a [Pp][Rr]" + permission: + user: "{{comment.actor.login}}" + actions: + label: "Send a PR" + + + # Move issue task - filters: open: true From b620a58b403ee5447c4aaadc57263447c3773e68 Mon Sep 17 00:00:00 2001 From: Jevan Chan Date: Mon, 19 Feb 2018 22:50:05 +0800 Subject: [PATCH 097/112] replace glob-regex with minimatch --- lib/optimize/SideEffectsFlagPlugin.js | 4 ++-- package.json | 2 +- yarn.lock | 4 ---- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/lib/optimize/SideEffectsFlagPlugin.js b/lib/optimize/SideEffectsFlagPlugin.js index 85ba09b7c..c5b6d2c71 100644 --- a/lib/optimize/SideEffectsFlagPlugin.js +++ b/lib/optimize/SideEffectsFlagPlugin.js @@ -4,7 +4,7 @@ */ "use strict"; -const globRegex = require("glob-regex"); +const minimatch = require("minimatch"); const HarmonyExportImportedSpecifierDependency = require("../dependencies/HarmonyExportImportedSpecifierDependency"); const HarmonyImportSideEffectDependency = require("../dependencies/HarmonyImportSideEffectDependency"); const HarmonyImportSpecifierDependency = require("../dependencies/HarmonyImportSpecifierDependency"); @@ -126,7 +126,7 @@ class SideEffectsFlagPlugin { case "boolean": return flagValue; case "string": - return globRegex(flagValue).test(moduleName); + return minimatch(moduleName, flagValue); case "object": return flagValue.some(glob => SideEffectsFlagPlugin.moduleHasSideEffects(moduleName, glob)); } diff --git a/package.json b/package.json index 71fc2054f..e6d251a1f 100644 --- a/package.json +++ b/package.json @@ -12,10 +12,10 @@ "chrome-trace-event": "^0.1.1", "enhanced-resolve": "^4.0.0-beta.2", "eslint-scope": "^3.7.1", - "glob-regex": "^0.2.2", "loader-runner": "^2.3.0", "loader-utils": "^1.1.0", "memory-fs": "~0.4.1", + "minimatch": "^3.0.4", "mkdirp": "~0.5.0", "neo-async": "^2.5.0", "node-libs-browser": "^2.0.0", diff --git a/yarn.lock b/yarn.lock index a765911e7..bfa39cfcf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1620,10 +1620,6 @@ glob-parent@^2.0.0: dependencies: is-glob "^2.0.0" -glob-regex@^0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/glob-regex/-/glob-regex-0.2.2.tgz#43dc4b0d986a394c7770a99802367d8300370977" - glob@7.1.1: version "7.1.1" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8" From e5b9340c4230b30ca410f8338f89fdb10d3a26df Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Tue, 20 Feb 2018 09:11:01 +0100 Subject: [PATCH 098/112] add wasm order test case --- test/cases/wasm/order/a.js | 7 +++++++ test/cases/wasm/order/b.js | 3 +++ test/cases/wasm/order/c.js | 5 +++++ test/cases/wasm/order/index.js | 7 +++++++ test/cases/wasm/order/test.filter.js | 5 +++++ test/cases/wasm/order/tracker.js | 8 ++++++++ test/cases/wasm/order/wasm.wasm | Bin 0 -> 82 bytes test/cases/wasm/order/wasm.wat | 9 +++++++++ 8 files changed, 44 insertions(+) create mode 100644 test/cases/wasm/order/a.js create mode 100644 test/cases/wasm/order/b.js create mode 100644 test/cases/wasm/order/c.js create mode 100644 test/cases/wasm/order/index.js create mode 100644 test/cases/wasm/order/test.filter.js create mode 100644 test/cases/wasm/order/tracker.js create mode 100644 test/cases/wasm/order/wasm.wasm create mode 100644 test/cases/wasm/order/wasm.wat diff --git a/test/cases/wasm/order/a.js b/test/cases/wasm/order/a.js new file mode 100644 index 000000000..5c381c7f6 --- /dev/null +++ b/test/cases/wasm/order/a.js @@ -0,0 +1,7 @@ +import { trackA, results } from "./tracker"; +import "./b.js"; +import "./wasm.wasm"; + +trackA(); + +export default results; diff --git a/test/cases/wasm/order/b.js b/test/cases/wasm/order/b.js new file mode 100644 index 000000000..aee70d227 --- /dev/null +++ b/test/cases/wasm/order/b.js @@ -0,0 +1,3 @@ +import { trackB } from "./tracker"; + +trackB(); diff --git a/test/cases/wasm/order/c.js b/test/cases/wasm/order/c.js new file mode 100644 index 000000000..20f3d44a4 --- /dev/null +++ b/test/cases/wasm/order/c.js @@ -0,0 +1,5 @@ +import { trackC } from "./tracker"; + +trackC(); + +export const magicNumber = 42; diff --git a/test/cases/wasm/order/index.js b/test/cases/wasm/order/index.js new file mode 100644 index 000000000..9fb91d7e6 --- /dev/null +++ b/test/cases/wasm/order/index.js @@ -0,0 +1,7 @@ +it("should be evaluated in the correct order", () => { + return import("./a").then(({ default: results }) => { + return Promise.resolve().then(() => { // wait an extra tick to get the tick from the tracker + results.should.be.eql(["b", "c", "wasm42", "a", "tick"]); + }); + }); +}); diff --git a/test/cases/wasm/order/test.filter.js b/test/cases/wasm/order/test.filter.js new file mode 100644 index 000000000..231773496 --- /dev/null +++ b/test/cases/wasm/order/test.filter.js @@ -0,0 +1,5 @@ +var supportsWebAssembly = require("../../../helpers/supportsWebAssembly"); + +module.exports = function(config) { + return supportsWebAssembly(); +}; diff --git a/test/cases/wasm/order/tracker.js b/test/cases/wasm/order/tracker.js new file mode 100644 index 000000000..920990928 --- /dev/null +++ b/test/cases/wasm/order/tracker.js @@ -0,0 +1,8 @@ +export let results = []; + +export function trackA() { results.push("a"); } +export function trackB() { results.push("b"); } +export function trackC() { results.push("c"); } +export function trackWasm(number) { results.push("wasm" + number); } + +Promise.resolve().then(() => results.push("tick")); diff --git a/test/cases/wasm/order/wasm.wasm b/test/cases/wasm/order/wasm.wasm new file mode 100644 index 0000000000000000000000000000000000000000..105c6a1a97f5e92875659258dc9718dc2383faad GIT binary patch literal 82 zcmW;CF$#bn00q$h6-0CC4$bLJT3a=dsBqDmy?W8~mWS910Z@y;jsS>R80YUA)0M0F fUB3h<=aV~|Epb26@{}!C*&zj~$w5 Date: Wed, 21 Feb 2018 00:36:14 +0800 Subject: [PATCH 099/112] replace minimatch with micromatch --- lib/optimize/SideEffectsFlagPlugin.js | 9 +++++++-- package.json | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/optimize/SideEffectsFlagPlugin.js b/lib/optimize/SideEffectsFlagPlugin.js index c5b6d2c71..a060ec874 100644 --- a/lib/optimize/SideEffectsFlagPlugin.js +++ b/lib/optimize/SideEffectsFlagPlugin.js @@ -4,7 +4,7 @@ */ "use strict"; -const minimatch = require("minimatch"); +const mm = require("micromatch"); const HarmonyExportImportedSpecifierDependency = require("../dependencies/HarmonyExportImportedSpecifierDependency"); const HarmonyImportSideEffectDependency = require("../dependencies/HarmonyImportSideEffectDependency"); const HarmonyImportSpecifierDependency = require("../dependencies/HarmonyImportSpecifierDependency"); @@ -126,7 +126,12 @@ class SideEffectsFlagPlugin { case "boolean": return flagValue; case "string": - return minimatch(moduleName, flagValue); + if(process.platform === "win32") { + flagValue = flagValue.replace(/\\/g, "/"); + } + return mm.isMatch(moduleName, flagValue, { + matchBase: true + }); case "object": return flagValue.some(glob => SideEffectsFlagPlugin.moduleHasSideEffects(moduleName, glob)); } diff --git a/package.json b/package.json index e6d251a1f..00c8e8569 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "loader-runner": "^2.3.0", "loader-utils": "^1.1.0", "memory-fs": "~0.4.1", - "minimatch": "^3.0.4", + "micromatch": "^3.1.6", "mkdirp": "~0.5.0", "neo-async": "^2.5.0", "node-libs-browser": "^2.0.0", From f35c7946857a1be0b1b6313063235237a02f6fde Mon Sep 17 00:00:00 2001 From: Jevan Chan Date: Wed, 21 Feb 2018 00:38:00 +0800 Subject: [PATCH 100/112] update sideEffects test --- test/SideEffectsFlagPlugin.unittest.js | 13 +++++++++++-- .../side-effects-override/webpack.config.js | 4 +--- .../node_modules/boolean-value-module/package.json | 2 +- .../node_modules/glob-value-module/package.json | 2 +- .../side-effects-values/webpack.config.js | 3 +-- 5 files changed, 15 insertions(+), 9 deletions(-) diff --git a/test/SideEffectsFlagPlugin.unittest.js b/test/SideEffectsFlagPlugin.unittest.js index aea8a1c05..33f5fb68f 100644 --- a/test/SideEffectsFlagPlugin.unittest.js +++ b/test/SideEffectsFlagPlugin.unittest.js @@ -15,10 +15,19 @@ describe("SideEffectsFlagPlugin", () => { it("should understand a glob", () => { SideEffectsFlagPlugin.moduleHasSideEffects("./src/x/y/z.js", "./src/**/*.js").should.eql(true); SideEffectsFlagPlugin.moduleHasSideEffects("./x.js", "./src/**/*.js").should.eql(false); + SideEffectsFlagPlugin.moduleHasSideEffects("./src/x/y/z.js", "./**/src/x/y/z.js").should.eql(true); SideEffectsFlagPlugin.moduleHasSideEffects("./src/x/y/z.js", "**.js").should.eql(true); - SideEffectsFlagPlugin.moduleHasSideEffects("./src/x/y/z.js", "./src**").should.eql(true); SideEffectsFlagPlugin.moduleHasSideEffects("./src/x/y/z.js", "./src/**/z.js").should.eql(true); - SideEffectsFlagPlugin.moduleHasSideEffects("./src/x/y/z.js", "**/x/**/z.js").should.eql(true); + SideEffectsFlagPlugin.moduleHasSideEffects("./src/x/y/z.js", "./**/x/**/z.js").should.eql(true); + SideEffectsFlagPlugin.moduleHasSideEffects("./src/x/y/z.js", "./**/src/**").should.eql(true); + SideEffectsFlagPlugin.moduleHasSideEffects("./src/x/y/z.js", "./**/src/*").should.eql(false); + SideEffectsFlagPlugin.moduleHasSideEffects("./src/x/y/z.js", "*.js").should.eql(true); + SideEffectsFlagPlugin.moduleHasSideEffects("./src/x/y/z.js", "x/**/z.js").should.eql(false); + SideEffectsFlagPlugin.moduleHasSideEffects("./src/x/y/z.js", "src/**/z.js").should.eql(true); + SideEffectsFlagPlugin.moduleHasSideEffects("./src/x/y/z.js", "src/**/{x,y,z}.js").should.eql(true); + SideEffectsFlagPlugin.moduleHasSideEffects("./src/x/y/z.js", "src/**/[x-z].js").should.eql(true); + SideEffectsFlagPlugin.moduleHasSideEffects("./src/x/y/z.js", "src/**/[[:lower:]].js").should.eql(true); + SideEffectsFlagPlugin.moduleHasSideEffects("./src/x/y/z.js", "!**/*.js").should.eql(false); }); it("should understand arrays", () => { diff --git a/test/configCases/side-effects/side-effects-override/webpack.config.js b/test/configCases/side-effects/side-effects-override/webpack.config.js index 213d69e6a..ab65d3174 100644 --- a/test/configCases/side-effects/side-effects-override/webpack.config.js +++ b/test/configCases/side-effects/side-effects-override/webpack.config.js @@ -2,9 +2,7 @@ const path = require("path"); module.exports = { mode: "production", module: { - rules: [ - - { + rules: [{ test: path.resolve(__dirname, "node_modules/pmodule"), sideEffects: true }, diff --git a/test/configCases/side-effects/side-effects-values/node_modules/boolean-value-module/package.json b/test/configCases/side-effects/side-effects-values/node_modules/boolean-value-module/package.json index 43c38c1bb..1b9564299 100644 --- a/test/configCases/side-effects/side-effects-values/node_modules/boolean-value-module/package.json +++ b/test/configCases/side-effects/side-effects-values/node_modules/boolean-value-module/package.json @@ -1,3 +1,3 @@ { - "sideEffects": false + "sideEffects": false } diff --git a/test/configCases/side-effects/side-effects-values/node_modules/glob-value-module/package.json b/test/configCases/side-effects/side-effects-values/node_modules/glob-value-module/package.json index 734907539..4d95c3cc2 100644 --- a/test/configCases/side-effects/side-effects-values/node_modules/glob-value-module/package.json +++ b/test/configCases/side-effects/side-effects-values/node_modules/glob-value-module/package.json @@ -1,5 +1,5 @@ { "sideEffects": [ - "**/a.js" + "./**/a.js" ] } diff --git a/test/configCases/side-effects/side-effects-values/webpack.config.js b/test/configCases/side-effects/side-effects-values/webpack.config.js index 57e6aa095..c5fce2d1b 100644 --- a/test/configCases/side-effects/side-effects-values/webpack.config.js +++ b/test/configCases/side-effects/side-effects-values/webpack.config.js @@ -1,7 +1,6 @@ module.exports = { mode: "production", module: { - rules: [ - ] + rules: [] } }; From bf018ac4370a40ad73083194dc64466e2b9dffee Mon Sep 17 00:00:00 2001 From: Jevan Chan Date: Wed, 21 Feb 2018 01:33:50 +0800 Subject: [PATCH 101/112] update yarn.lock --- yarn.lock | 518 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 512 insertions(+), 6 deletions(-) diff --git a/yarn.lock b/yarn.lock index bfa39cfcf..132aedd15 100644 --- a/yarn.lock +++ b/yarn.lock @@ -160,10 +160,18 @@ arr-diff@^2.0.0: dependencies: arr-flatten "^1.0.1" -arr-flatten@^1.0.1: +arr-diff@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" + +arr-flatten@^1.0.1, arr-flatten@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" +arr-union@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" + array-flatten@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" @@ -182,6 +190,10 @@ array-unique@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" +array-unique@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" + arrify@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" @@ -220,6 +232,10 @@ assert@^1.1.1: dependencies: util "0.10.3" +assign-symbols@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" + async-each@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" @@ -238,6 +254,10 @@ asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" +atob@^2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/atob/-/atob-2.0.3.tgz#19c7a760473774468f20b2d2d03372ad7d4cbf5d" + autoprefixer@^6.3.1: version "6.7.7" resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-6.7.7.tgz#1dbd1c835658e35ce3f9984099db00585c782014" @@ -281,6 +301,18 @@ base64-js@^1.0.2: version "1.2.1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.2.1.tgz#a91947da1f4a516ea38e5b4ec0ec3773675e0886" +base@^0.11.1: + version "0.11.2" + resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" + dependencies: + cache-base "^1.0.1" + class-utils "^0.3.5" + component-emitter "^1.2.1" + define-property "^1.0.0" + isobject "^3.0.1" + mixin-deep "^1.2.0" + pascalcase "^0.1.1" + bcrypt-pbkdf@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d" @@ -362,6 +394,23 @@ braces@^1.8.2: preserve "^0.2.0" repeat-element "^1.1.2" +braces@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.1.tgz#7086c913b4e5a08dbe37ac0ee6a2500c4ba691bb" + dependencies: + arr-flatten "^1.1.0" + array-unique "^0.3.2" + define-property "^1.0.0" + extend-shallow "^2.0.1" + fill-range "^4.0.0" + isobject "^3.0.1" + kind-of "^6.0.2" + repeat-element "^1.1.2" + snapdragon "^0.8.1" + snapdragon-node "^2.0.1" + split-string "^3.0.2" + to-regex "^3.0.1" + brorand@^1.0.1: version "1.1.0" resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" @@ -469,6 +518,20 @@ cacache@^10.0.0: unique-filename "^1.1.0" y18n "^3.2.1" +cache-base@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" + dependencies: + collection-visit "^1.0.0" + component-emitter "^1.2.1" + get-value "^2.0.6" + has-value "^1.0.0" + isobject "^3.0.1" + set-value "^2.0.0" + to-object-path "^0.3.0" + union-value "^1.0.0" + unset-value "^1.0.0" + caller-path@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f" @@ -577,6 +640,15 @@ clap@^1.0.9: dependencies: chalk "^1.1.3" +class-utils@^0.3.5: + version "0.3.6" + resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" + dependencies: + arr-union "^3.1.0" + define-property "^0.2.5" + isobject "^3.0.0" + static-extend "^0.1.1" + clean-css@^3.1.9: version "3.4.28" resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-3.4.28.tgz#bf1945e82fc808f55695e6ddeaec01400efd03ff" @@ -646,6 +718,13 @@ coffeescript@^1.10.0: version "1.12.7" resolved "https://registry.yarnpkg.com/coffeescript/-/coffeescript-1.12.7.tgz#e57ee4c4867cf7f606bfc4a0f2d550c0981ddd27" +collection-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" + dependencies: + map-visit "^1.0.0" + object-visit "^1.0.0" + color-convert@^1.3.0, color-convert@^1.9.0: version "1.9.1" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.1.tgz#c1261107aeb2f294ebffec9ed9ecad529a6097ed" @@ -712,6 +791,10 @@ commondir@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" +component-emitter@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.1.tgz#137918d6d78283f7df7a6b7c5a63e140e69425e6" + concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" @@ -778,6 +861,10 @@ copy-concurrently@^1.0.0: rimraf "^2.5.4" run-queue "^1.0.0" +copy-descriptor@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" + core-js@^1.0.0: version "1.2.7" resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636" @@ -985,7 +1072,7 @@ debug@2.6.8: dependencies: ms "2.0.0" -debug@^2.2.0: +debug@^2.2.0, debug@^2.3.3: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" dependencies: @@ -1007,6 +1094,10 @@ decamelize@^1.0.0, decamelize@^1.1.2: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" +decode-uri-component@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" + deep-extend@~0.4.0: version "0.4.2" resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.4.2.tgz#48b699c27e334bf89f10892be432f6e4c7d34a7f" @@ -1015,6 +1106,25 @@ deep-is@~0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" +define-property@^0.2.5: + version "0.2.5" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" + dependencies: + is-descriptor "^0.1.0" + +define-property@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" + dependencies: + is-descriptor "^1.0.0" + +define-property@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d" + dependencies: + is-descriptor "^1.0.2" + isobject "^3.0.1" + defined@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693" @@ -1315,6 +1425,18 @@ expand-brackets@^0.1.4: dependencies: is-posix-bracket "^0.1.0" +expand-brackets@^2.1.4: + version "2.1.4" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" + dependencies: + debug "^2.3.3" + define-property "^0.2.5" + extend-shallow "^2.0.1" + posix-character-classes "^0.1.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + expand-range@^1.8.1: version "1.8.2" resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" @@ -1351,6 +1473,19 @@ express@~4.13.1: utils-merge "1.0.0" vary "~1.0.1" +extend-shallow@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" + dependencies: + is-extendable "^0.1.0" + +extend-shallow@^3.0.0, extend-shallow@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" + dependencies: + assign-symbols "^1.0.0" + is-extendable "^1.0.1" + extend@~3.0.0, extend@~3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" @@ -1369,6 +1504,19 @@ extglob@^0.3.1: dependencies: is-extglob "^1.0.0" +extglob@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" + dependencies: + array-unique "^0.3.2" + define-property "^1.0.0" + expand-brackets "^2.1.4" + extend-shallow "^2.0.1" + fragment-cache "^0.2.1" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + extsprintf@1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" @@ -1439,6 +1587,15 @@ fill-range@^2.1.0: repeat-element "^1.1.2" repeat-string "^1.5.2" +fill-range@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" + dependencies: + extend-shallow "^2.0.1" + is-number "^3.0.0" + repeat-string "^1.6.1" + to-regex-range "^2.1.0" + finalhandler@0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-0.4.1.tgz#85a17c6c59a94717d262d61230d4b0ebe3d4a14d" @@ -1482,7 +1639,7 @@ flush-write-stream@^1.0.0: inherits "^2.0.1" readable-stream "^2.0.4" -for-in@^1.0.1: +for-in@^1.0.1, for-in@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" @@ -1522,6 +1679,12 @@ forwarded@~0.1.0: version "0.1.2" resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84" +fragment-cache@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" + dependencies: + map-cache "^0.2.2" + fresh@0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.3.0.tgz#651f838e22424e7566de161d8358caa199f83d4f" @@ -1601,6 +1764,10 @@ generate-object-property@^1.1.0: dependencies: is-property "^1.0.0" +get-value@^2.0.3, get-value@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" + getpass@^0.1.1: version "0.1.7" resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" @@ -1748,6 +1915,33 @@ has-unicode@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" +has-value@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" + dependencies: + get-value "^2.0.3" + has-values "^0.1.4" + isobject "^2.0.0" + +has-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" + dependencies: + get-value "^2.0.6" + has-values "^1.0.0" + isobject "^3.0.0" + +has-values@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" + +has-values@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" + dependencies: + is-number "^3.0.0" + kind-of "^4.0.0" + has@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/has/-/has-1.0.1.tgz#8461733f538b0837c9361e39a9ab9e9704dc2f28" @@ -1935,6 +2129,18 @@ is-absolute-url@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-2.1.0.tgz#50530dfb84fcc9aa7dbe7852e83a37b93b9f2aa6" +is-accessor-descriptor@^0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" + dependencies: + kind-of "^3.0.2" + +is-accessor-descriptor@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656" + dependencies: + kind-of "^6.0.0" + is-binary-path@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" @@ -1945,6 +2151,34 @@ is-buffer@^1.1.5: version "1.1.6" resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" +is-data-descriptor@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" + dependencies: + kind-of "^3.0.2" + +is-data-descriptor@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7" + dependencies: + kind-of "^6.0.0" + +is-descriptor@^0.1.0: + version "0.1.6" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" + dependencies: + is-accessor-descriptor "^0.1.6" + is-data-descriptor "^0.1.4" + kind-of "^5.0.0" + +is-descriptor@^1.0.0, is-descriptor@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec" + dependencies: + is-accessor-descriptor "^1.0.0" + is-data-descriptor "^1.0.0" + kind-of "^6.0.2" + is-dotfile@^1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" @@ -1955,10 +2189,16 @@ is-equal-shallow@^0.1.3: dependencies: is-primitive "^2.0.0" -is-extendable@^0.1.1: +is-extendable@^0.1.0, is-extendable@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" +is-extendable@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" + dependencies: + is-plain-object "^2.0.4" + is-extglob@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" @@ -2000,6 +2240,16 @@ is-number@^3.0.0: dependencies: kind-of "^3.0.2" +is-number@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-4.0.0.tgz#0026e37f5454d73e356dfe6564699867c6a7f0ff" + +is-odd@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-odd/-/is-odd-2.0.0.tgz#7646624671fd7ea558ccd9a2795182f2958f1b24" + dependencies: + is-number "^4.0.0" + is-path-cwd@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d" @@ -2020,6 +2270,12 @@ is-plain-obj@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" +is-plain-object@^2.0.1, is-plain-object@^2.0.3, is-plain-object@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" + dependencies: + isobject "^3.0.1" + is-posix-bracket@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" @@ -2058,6 +2314,10 @@ is-typedarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" +is-windows@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" + isarray@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" @@ -2080,6 +2340,10 @@ isobject@^2.0.0: dependencies: isarray "1.0.0" +isobject@^3.0.0, isobject@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" + isomorphic-fetch@^2.1.1: version "2.2.1" resolved "https://registry.yarnpkg.com/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz#611ae1acf14f5e81f729507472819fe9733558a9" @@ -2244,7 +2508,7 @@ jstransformer@0.0.2: is-promise "^2.0.0" promise "^6.0.1" -kind-of@^3.0.2: +kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: version "3.2.2" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" dependencies: @@ -2256,10 +2520,24 @@ kind-of@^4.0.0: dependencies: is-buffer "^1.1.5" +kind-of@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" + +kind-of@^6.0.0, kind-of@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051" + lazy-cache@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" +lazy-cache@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-2.0.2.tgz#b9190a4f913354694840859f8a8f7084d8822264" + dependencies: + set-getter "^0.1.0" + lcov-parse@0.0.10, lcov-parse@0.x: version "0.0.10" resolved "https://registry.yarnpkg.com/lcov-parse/-/lcov-parse-0.0.10.tgz#1b0b8ff9ac9c7889250582b70b71315d9da6d9a3" @@ -2428,6 +2706,16 @@ make-dir@^1.0.0: dependencies: pify "^3.0.0" +map-cache@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" + +map-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" + dependencies: + object-visit "^1.0.0" + math-expression-evaluator@^1.2.14: version "1.2.17" resolved "https://registry.yarnpkg.com/math-expression-evaluator/-/math-expression-evaluator-1.2.17.tgz#de819fdbcd84dccd8fae59c6aeb79615b9d266ac" @@ -2476,6 +2764,24 @@ micromatch@^2.1.5: parse-glob "^3.0.4" regex-cache "^0.4.2" +micromatch@^3.1.6: + version "3.1.6" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.6.tgz#8d7c043b48156f408ca07a4715182b79b99420bf" + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + braces "^2.3.1" + define-property "^2.0.2" + extend-shallow "^3.0.2" + extglob "^2.0.4" + fragment-cache "^0.2.1" + kind-of "^6.0.2" + nanomatch "^1.2.9" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + miller-rabin@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" @@ -2546,6 +2852,13 @@ mississippi@^1.3.0: stream-each "^1.1.0" through2 "^2.0.0" +mixin-deep@^1.2.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.1.tgz#a49e7268dce1a0d9698e45326c5626df3543d0fe" + dependencies: + for-in "^1.0.2" + is-extendable "^1.0.1" + mkdirp@0.5.1, mkdirp@0.5.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" @@ -2604,6 +2917,23 @@ nan@^2.3.0: version "2.8.0" resolved "https://registry.yarnpkg.com/nan/-/nan-2.8.0.tgz#ed715f3fe9de02b57a5e6252d90a96675e1f085a" +nanomatch@^1.2.9: + version "1.2.9" + resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.9.tgz#879f7150cb2dab7a471259066c104eee6e0fa7c2" + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + define-property "^2.0.2" + extend-shallow "^3.0.2" + fragment-cache "^0.2.1" + is-odd "^2.0.0" + is-windows "^1.0.2" + kind-of "^6.0.2" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + native-promise-only@^0.8.1: version "0.8.1" resolved "https://registry.yarnpkg.com/native-promise-only/-/native-promise-only-0.8.1.tgz#20a318c30cb45f71fe7adfbf7b21c99c1472ef11" @@ -2728,6 +3058,20 @@ object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" +object-copy@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" + dependencies: + copy-descriptor "^0.1.0" + define-property "^0.2.5" + kind-of "^3.0.3" + +object-visit@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" + dependencies: + isobject "^3.0.0" + object.omit@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" @@ -2735,6 +3079,12 @@ object.omit@^2.0.0: for-own "^0.1.4" is-extendable "^0.1.1" +object.pick@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" + dependencies: + isobject "^3.0.1" + on-finished@~2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" @@ -2847,6 +3197,10 @@ parseurl@~1.3.1: version "1.3.2" resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.2.tgz#fc289d4ed8993119460c156253262cdc8de65bf3" +pascalcase@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" + path-browserify@0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.0.tgz#a0b870729aae214005b7d5032ec2cbbb0fb4451a" @@ -2927,6 +3281,10 @@ pluralize@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-7.0.0.tgz#298b89df8b93b0221dbf421ad2b1b1ea23fc6777" +posix-character-classes@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" + postcss-calc@^5.2.0: version "5.3.1" resolved "https://registry.yarnpkg.com/postcss-calc/-/postcss-calc-5.3.1.tgz#77bae7ca928ad85716e2fda42f261bf7c1d65b5e" @@ -3419,6 +3777,13 @@ regex-cache@^0.4.2: dependencies: is-equal-shallow "^0.1.3" +regex-not@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" + dependencies: + extend-shallow "^3.0.2" + safe-regex "^1.1.0" + regexpu-core@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-1.0.0.tgz#86a763f58ee4d7c2f6b102e4764050de7ed90c6b" @@ -3445,7 +3810,7 @@ repeat-element@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" -repeat-string@^1.5.2: +repeat-string@^1.5.2, repeat-string@^1.6.1: version "1.6.1" resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" @@ -3548,6 +3913,10 @@ resolve-from@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226" +resolve-url@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" + resolve@1.1.x: version "1.1.7" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" @@ -3565,6 +3934,10 @@ restore-cursor@^2.0.0: onetime "^2.0.0" signal-exit "^3.0.2" +ret@~0.1.10: + version "0.1.15" + resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" + right-align@^0.1.1: version "0.1.3" resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" @@ -3610,6 +3983,12 @@ safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@~5.1.0, version "5.1.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" +safe-regex@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" + dependencies: + ret "~0.1.10" + samsam@1.x, samsam@^1.1.3: version "1.3.0" resolved "https://registry.yarnpkg.com/samsam/-/samsam-1.3.0.tgz#8d1d9350e25622da30de3e44ba692b5221ab7c50" @@ -3695,10 +4074,34 @@ set-blocking@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" +set-getter@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/set-getter/-/set-getter-0.1.0.tgz#d769c182c9d5a51f409145f2fba82e5e86e80376" + dependencies: + to-object-path "^0.3.0" + set-immediate-shim@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" +set-value@^0.4.3: + version "0.4.3" + resolved "https://registry.yarnpkg.com/set-value/-/set-value-0.4.3.tgz#7db08f9d3d22dc7f78e53af3c3bf4666ecdfccf1" + dependencies: + extend-shallow "^2.0.1" + is-extendable "^0.1.1" + is-plain-object "^2.0.1" + to-object-path "^0.3.0" + +set-value@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.0.tgz#71ae4a88f0feefbbf52d1ea604f3fb315ebb6274" + dependencies: + extend-shallow "^2.0.1" + is-extendable "^0.1.1" + is-plain-object "^2.0.3" + split-string "^3.0.1" + setimmediate@^1.0.4, setimmediate@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" @@ -3791,6 +4194,33 @@ slice-ansi@1.0.0: dependencies: is-fullwidth-code-point "^2.0.0" +snapdragon-node@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" + dependencies: + define-property "^1.0.0" + isobject "^3.0.0" + snapdragon-util "^3.0.1" + +snapdragon-util@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" + dependencies: + kind-of "^3.2.0" + +snapdragon@^0.8.1: + version "0.8.1" + resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.1.tgz#e12b5487faded3e3dea0ac91e9400bf75b401370" + dependencies: + base "^0.11.1" + debug "^2.2.0" + define-property "^0.2.5" + extend-shallow "^2.0.1" + map-cache "^0.2.2" + source-map "^0.5.6" + source-map-resolve "^0.5.0" + use "^2.0.0" + sntp@1.x.x: version "1.0.9" resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" @@ -3813,6 +4243,20 @@ source-list-map@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.0.tgz#aaa47403f7b245a92fbc97ea08f250d6087ed085" +source-map-resolve@^0.5.0: + version "0.5.1" + resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.1.tgz#7ad0f593f2281598e854df80f19aae4b92d7a11a" + dependencies: + atob "^2.0.0" + decode-uri-component "^0.2.0" + resolve-url "^0.2.1" + source-map-url "^0.4.0" + urix "^0.1.0" + +source-map-url@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" + source-map@0.4.x, source-map@^0.4.4: version "0.4.4" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" @@ -3839,6 +4283,12 @@ source-map@~0.2.0: dependencies: amdefine ">=0.0.4" +split-string@^3.0.1, split-string@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" + dependencies: + extend-shallow "^3.0.0" + sprintf-js@~1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" @@ -3863,6 +4313,13 @@ ssri@^5.0.0: dependencies: safe-buffer "^5.1.0" +static-extend@^0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" + dependencies: + define-property "^0.2.5" + object-copy "^0.1.0" + statuses@1: version "1.4.0" resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.4.0.tgz#bb73d446da2796106efcc1b601a253d6c46bd087" @@ -4066,6 +4523,27 @@ to-arraybuffer@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43" +to-object-path@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" + dependencies: + kind-of "^3.0.2" + +to-regex-range@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" + dependencies: + is-number "^3.0.0" + repeat-string "^1.6.1" + +to-regex@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.1.tgz#15358bee4a2c83bd76377ba1dc049d0f18837aae" + dependencies: + define-property "^0.2.5" + extend-shallow "^2.0.1" + regex-not "^1.0.0" + topo@1.x.x: version "1.1.0" resolved "https://registry.yarnpkg.com/topo/-/topo-1.1.0.tgz#e9d751615d1bb87dc865db182fa1ca0a5ef536d5" @@ -4173,6 +4651,15 @@ uid-number@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81" +union-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.0.tgz#5c71c34cb5bad5dcebe3ea0cd08207ba5aa1aea4" + dependencies: + arr-union "^3.1.0" + get-value "^2.0.6" + is-extendable "^0.1.1" + set-value "^0.4.3" + uniq@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff" @@ -4203,6 +4690,17 @@ unpipe@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" +unset-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" + dependencies: + has-value "^0.3.1" + isobject "^3.0.0" + +urix@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" + url-loader@^0.6.2: version "0.6.2" resolved "https://registry.yarnpkg.com/url-loader/-/url-loader-0.6.2.tgz#a007a7109620e9d988d14bce677a1decb9a993f7" @@ -4218,6 +4716,14 @@ url@^0.11.0: punycode "1.3.2" querystring "0.2.0" +use@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/use/-/use-2.0.2.tgz#ae28a0d72f93bf22422a18a2e379993112dec8e8" + dependencies: + define-property "^0.2.5" + isobject "^3.0.0" + lazy-cache "^2.0.2" + util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" From a63bb774c53c40a6e6f9a267a08b5e147bf3a542 Mon Sep 17 00:00:00 2001 From: Jevan Chan Date: Wed, 21 Feb 2018 12:42:36 +0800 Subject: [PATCH 102/112] upgrade micromatch, add sideEffects flag unit test cases --- package.json | 2 +- test/SideEffectsFlagPlugin.unittest.js | 1 + yarn.lock | 6 +++--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 00c8e8569..5a994bf67 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "loader-runner": "^2.3.0", "loader-utils": "^1.1.0", "memory-fs": "~0.4.1", - "micromatch": "^3.1.6", + "micromatch": "^3.1.8", "mkdirp": "~0.5.0", "neo-async": "^2.5.0", "node-libs-browser": "^2.0.0", diff --git a/test/SideEffectsFlagPlugin.unittest.js b/test/SideEffectsFlagPlugin.unittest.js index 33f5fb68f..be93f188c 100644 --- a/test/SideEffectsFlagPlugin.unittest.js +++ b/test/SideEffectsFlagPlugin.unittest.js @@ -27,6 +27,7 @@ describe("SideEffectsFlagPlugin", () => { SideEffectsFlagPlugin.moduleHasSideEffects("./src/x/y/z.js", "src/**/{x,y,z}.js").should.eql(true); SideEffectsFlagPlugin.moduleHasSideEffects("./src/x/y/z.js", "src/**/[x-z].js").should.eql(true); SideEffectsFlagPlugin.moduleHasSideEffects("./src/x/y/z.js", "src/**/[[:lower:]].js").should.eql(true); + SideEffectsFlagPlugin.moduleHasSideEffects("./src/x/y/z.js", "!*.js").should.eql(false); SideEffectsFlagPlugin.moduleHasSideEffects("./src/x/y/z.js", "!**/*.js").should.eql(false); }); diff --git a/yarn.lock b/yarn.lock index 132aedd15..91d7d93e3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2764,9 +2764,9 @@ micromatch@^2.1.5: parse-glob "^3.0.4" regex-cache "^0.4.2" -micromatch@^3.1.6: - version "3.1.6" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.6.tgz#8d7c043b48156f408ca07a4715182b79b99420bf" +micromatch@^3.1.8: + version "3.1.8" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.8.tgz#5c8caa008de588eebb395e8c0ad12c128f25fff1" dependencies: arr-diff "^4.0.0" array-unique "^0.3.2" From 8a888cf41624c9cad3d2cb322bf190040779e883 Mon Sep 17 00:00:00 2001 From: Michael Ciniawsky Date: Wed, 21 Feb 2018 06:58:08 +0100 Subject: [PATCH 103/112] fix(schemas/plugins): rm unnecessary `id`'s --- schemas/plugins/BannerPlugin.json | 1 - schemas/plugins/DllPlugin.json | 1 - schemas/plugins/DllReferencePlugin.json | 1 - schemas/plugins/HashedModuleIdsPlugin.json | 1 - schemas/plugins/LoaderOptionsPlugin.json | 1 - schemas/plugins/SourceMapDevToolPlugin.json | 1 - schemas/plugins/WatchIgnorePlugin.json | 1 - schemas/plugins/debug/ProfilingPlugin.json | 1 - schemas/plugins/optimize/AggressiveSplittingPlugin.json | 1 - schemas/plugins/optimize/LimitChunkCountPlugin.json | 1 - schemas/plugins/optimize/MinChunkSizePlugin.json | 1 - 11 files changed, 11 deletions(-) diff --git a/schemas/plugins/BannerPlugin.json b/schemas/plugins/BannerPlugin.json index f39d88814..f2e502132 100644 --- a/schemas/plugins/BannerPlugin.json +++ b/schemas/plugins/BannerPlugin.json @@ -1,5 +1,4 @@ { - "id": "BannerPlugin", "definitions": { "rule": { "oneOf": [ diff --git a/schemas/plugins/DllPlugin.json b/schemas/plugins/DllPlugin.json index 405d712a2..20c47588d 100644 --- a/schemas/plugins/DllPlugin.json +++ b/schemas/plugins/DllPlugin.json @@ -1,5 +1,4 @@ { - "id": "DllPlugin", "additionalProperties": false, "required": [ "path" diff --git a/schemas/plugins/DllReferencePlugin.json b/schemas/plugins/DllReferencePlugin.json index 26fe597ca..75fcff565 100644 --- a/schemas/plugins/DllReferencePlugin.json +++ b/schemas/plugins/DllReferencePlugin.json @@ -1,5 +1,4 @@ { - "id": "DllReferencePlugin", "additionalProperties": false, "anyOf": [ { diff --git a/schemas/plugins/HashedModuleIdsPlugin.json b/schemas/plugins/HashedModuleIdsPlugin.json index 382c52b5e..66ed722f6 100644 --- a/schemas/plugins/HashedModuleIdsPlugin.json +++ b/schemas/plugins/HashedModuleIdsPlugin.json @@ -1,5 +1,4 @@ { - "id": "HashedModuleIdsPlugin", "type": "object", "additionalProperties": false, "properties": { diff --git a/schemas/plugins/LoaderOptionsPlugin.json b/schemas/plugins/LoaderOptionsPlugin.json index c3dc27e73..3a84e0347 100644 --- a/schemas/plugins/LoaderOptionsPlugin.json +++ b/schemas/plugins/LoaderOptionsPlugin.json @@ -1,5 +1,4 @@ { - "id": "LoaderOptionsPlugin", "type": "object", "additionalProperties": true, "properties": { diff --git a/schemas/plugins/SourceMapDevToolPlugin.json b/schemas/plugins/SourceMapDevToolPlugin.json index 32fcd0675..b0d11ae2a 100644 --- a/schemas/plugins/SourceMapDevToolPlugin.json +++ b/schemas/plugins/SourceMapDevToolPlugin.json @@ -1,5 +1,4 @@ { - "id": "SourceMapDevToolPlugin", "type": "object", "additionalProperties": false, "definitions": { diff --git a/schemas/plugins/WatchIgnorePlugin.json b/schemas/plugins/WatchIgnorePlugin.json index f089b3ad8..a69c75529 100644 --- a/schemas/plugins/WatchIgnorePlugin.json +++ b/schemas/plugins/WatchIgnorePlugin.json @@ -1,5 +1,4 @@ { - "id": "WatchIgnorePlugin", "description": "A list of RegExps or absolute paths to directories or files that should be ignored", "type": "array", "items": { diff --git a/schemas/plugins/debug/ProfilingPlugin.json b/schemas/plugins/debug/ProfilingPlugin.json index 20bbdc9df..299762f58 100644 --- a/schemas/plugins/debug/ProfilingPlugin.json +++ b/schemas/plugins/debug/ProfilingPlugin.json @@ -1,5 +1,4 @@ { - "id": "ProfilingPlugin", "type": "object", "additionalProperties": false, "properties": { diff --git a/schemas/plugins/optimize/AggressiveSplittingPlugin.json b/schemas/plugins/optimize/AggressiveSplittingPlugin.json index c9783e056..6c699d5e6 100644 --- a/schemas/plugins/optimize/AggressiveSplittingPlugin.json +++ b/schemas/plugins/optimize/AggressiveSplittingPlugin.json @@ -1,5 +1,4 @@ { - "id": "AggressiveSplittingPlugin", "type": "object", "additionalProperties": false, "properties": { diff --git a/schemas/plugins/optimize/LimitChunkCountPlugin.json b/schemas/plugins/optimize/LimitChunkCountPlugin.json index f51fa0366..5e2b67619 100644 --- a/schemas/plugins/optimize/LimitChunkCountPlugin.json +++ b/schemas/plugins/optimize/LimitChunkCountPlugin.json @@ -1,5 +1,4 @@ { - "id": "LimitChunkCountPlugin", "type": "object", "additionalProperties": false, "properties": { diff --git a/schemas/plugins/optimize/MinChunkSizePlugin.json b/schemas/plugins/optimize/MinChunkSizePlugin.json index 97d249193..2cb57a0b0 100644 --- a/schemas/plugins/optimize/MinChunkSizePlugin.json +++ b/schemas/plugins/optimize/MinChunkSizePlugin.json @@ -1,5 +1,4 @@ { - "id": "MinChunkSizePlugin", "additionalProperties": false, "type": "object", "required": [ From 000b1ee804a285a3b8b6720cd1b62f9cabab09c8 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Wed, 21 Feb 2018 20:25:22 +0100 Subject: [PATCH 104/112] only set labels for reviews by users with write permission --- open-bot.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/open-bot.yaml b/open-bot.yaml index 4e2ee7c84..73c8b8b27 100644 --- a/open-bot.yaml +++ b/open-bot.yaml @@ -290,6 +290,8 @@ rules: ensure: value: "{{review.state}}" equals: APPROVED + permission: + user: "{{review.user.login}}" actions: label: add: "PR: reviewed-approved" @@ -303,6 +305,8 @@ rules: commit: true review: state: APPROVED|CHANGES_REQUESTED + permission: + user: "{{review.user.login}}" ensure: value: "{{review.state}}" equals: CHANGES_REQUESTED @@ -319,6 +323,8 @@ rules: review: state: APPROVED|CHANGES_REQUESTED commit: true + permission: + user: "{{review.user.login}}" not: label: "review-outdated" ensure: From 40ee8c76d2039440b378df8520c713da76bccbc6 Mon Sep 17 00:00:00 2001 From: Florent Cailhol Date: Thu, 22 Feb 2018 11:27:11 +0100 Subject: [PATCH 105/112] Use MD4 for hashing --- lib/HashedModuleIdsPlugin.js | 2 +- lib/ModuleFilenameHelpers.js | 2 +- lib/SourceMapDevToolPlugin.js | 2 +- lib/WebpackOptionsDefaulter.js | 2 +- lib/optimize/ConcatenatedModule.js | 2 +- lib/optimize/SplitChunksPlugin.js | 2 +- .../aggressive-splitting-entry/expected.txt | 42 ++++++------ .../expected.txt | 64 ++++++++++--------- .../chunks-development/expected.txt | 2 +- test/statsCases/chunks/expected.txt | 2 +- test/statsCases/color-disabled/expected.txt | 2 +- .../color-enabled-custom/expected.txt | 2 +- test/statsCases/color-enabled/expected.txt | 2 +- .../commons-chunk-min-size-0/expected.txt | 2 +- .../expected.txt | 2 +- .../commons-plugin-issue-4980/expected.txt | 14 ++-- test/statsCases/define-plugin/expected.txt | 6 +- .../exclude-with-loader/expected.txt | 2 +- test/statsCases/external/expected.txt | 2 +- test/statsCases/filter-warnings/expected.txt | 28 ++++---- .../import-context-filter/expected.txt | 2 +- test/statsCases/import-weak/expected.txt | 2 +- .../limit-chunk-count-plugin/expected.txt | 10 +-- .../max-modules-default/expected.txt | 2 +- test/statsCases/max-modules/expected.txt | 2 +- .../named-chunks-plugin-async/expected.txt | 2 +- .../named-chunks-plugin/expected.txt | 2 +- .../expected.txt | 2 +- test/statsCases/optimize-chunks/expected.txt | 2 +- test/statsCases/preset-detailed/expected.txt | 2 +- test/statsCases/preset-normal/expected.txt | 2 +- test/statsCases/preset-verbose/expected.txt | 2 +- .../resolve-plugin-context/expected.txt | 2 +- .../reverse-sort-modules/expected.txt | 2 +- .../scope-hoisting-bailouts/expected.txt | 2 +- .../scope-hoisting-multi/expected.txt | 6 +- test/statsCases/simple-more-info/expected.txt | 2 +- test/statsCases/simple/expected.txt | 2 +- test/statsCases/split-chunks/expected.txt | 10 +-- test/statsCases/tree-shaking/expected.txt | 2 +- .../statsCases/warnings-uglifyjs/expected.txt | 2 +- 41 files changed, 125 insertions(+), 121 deletions(-) diff --git a/lib/HashedModuleIdsPlugin.js b/lib/HashedModuleIdsPlugin.js index 71158d206..54320e61f 100644 --- a/lib/HashedModuleIdsPlugin.js +++ b/lib/HashedModuleIdsPlugin.js @@ -14,7 +14,7 @@ class HashedModuleIdsPlugin { this.options = Object.assign({ context: null, - hashFunction: "md5", + hashFunction: "md4", hashDigest: "base64", hashDigestLength: 4 }, options); diff --git a/lib/ModuleFilenameHelpers.js b/lib/ModuleFilenameHelpers.js index a01071a9b..3da9a63b5 100644 --- a/lib/ModuleFilenameHelpers.js +++ b/lib/ModuleFilenameHelpers.js @@ -42,7 +42,7 @@ const getBefore = (str, token) => { }; const getHash = str => { - const hash = createHash("md5"); + const hash = createHash("md4"); hash.update(str); return hash.digest("hex").substr(0, 4); }; diff --git a/lib/SourceMapDevToolPlugin.js b/lib/SourceMapDevToolPlugin.js index 69d85d87b..e729dce55 100644 --- a/lib/SourceMapDevToolPlugin.js +++ b/lib/SourceMapDevToolPlugin.js @@ -211,7 +211,7 @@ class SourceMapDevToolPlugin { basename: basename(filename) }); if(sourceMapFile.includes("[contenthash]")) { - sourceMapFile = sourceMapFile.replace(/\[contenthash\]/g, createHash("md5").update(sourceMapString).digest("hex")); + sourceMapFile = sourceMapFile.replace(/\[contenthash\]/g, createHash("md4").update(sourceMapString).digest("hex")); } const sourceMapUrl = options.publicPath ? options.publicPath + sourceMapFile.replace(/\\/g, "/") : path.relative(path.dirname(file), sourceMapFile).replace(/\\/g, "/"); if(currentSourceMappingURLComment !== false) { diff --git a/lib/WebpackOptionsDefaulter.js b/lib/WebpackOptionsDefaulter.js index a3b5ee65a..6de760604 100644 --- a/lib/WebpackOptionsDefaulter.js +++ b/lib/WebpackOptionsDefaulter.js @@ -125,7 +125,7 @@ class WebpackOptionsDefaulter extends OptionsDefaulter { this.set("output.crossOriginLoading", false); this.set("output.jsonpScriptType", false); this.set("output.chunkLoadTimeout", 120000); - this.set("output.hashFunction", "md5"); + this.set("output.hashFunction", "md4"); this.set("output.hashDigest", "hex"); this.set("output.hashDigestLength", 20); this.set("output.devtoolLineToLine", false); diff --git a/lib/optimize/ConcatenatedModule.js b/lib/optimize/ConcatenatedModule.js index f69ab44d8..328fe0018 100644 --- a/lib/optimize/ConcatenatedModule.js +++ b/lib/optimize/ConcatenatedModule.js @@ -361,7 +361,7 @@ class ConcatenatedModule extends Module { orderedConcatenationListIdentifiers += " "; } } - const hash = createHash("md5"); + const hash = createHash("md4"); hash.update(orderedConcatenationListIdentifiers); return this.rootModule.identifier() + " " + hash.digest("hex"); } diff --git a/lib/optimize/SplitChunksPlugin.js b/lib/optimize/SplitChunksPlugin.js index 90264ca13..74c2d8432 100644 --- a/lib/optimize/SplitChunksPlugin.js +++ b/lib/optimize/SplitChunksPlugin.js @@ -10,7 +10,7 @@ const GraphHelpers = require("../GraphHelpers"); const isSubset = require("../util/SetHelpers").isSubset; const hashFilename = (name) => { - return crypto.createHash("md5").update(name).digest("hex").slice(0, 8); + return crypto.createHash("md4").update(name).digest("hex").slice(0, 8); }; const sortByIdentifier = (a, b) => { diff --git a/test/statsCases/aggressive-splitting-entry/expected.txt b/test/statsCases/aggressive-splitting-entry/expected.txt index 1b54686d8..493e0a7a8 100644 --- a/test/statsCases/aggressive-splitting-entry/expected.txt +++ b/test/statsCases/aggressive-splitting-entry/expected.txt @@ -1,53 +1,53 @@ -Hash: 1d3bfcee111df03fa6251d3bfcee111df03fa625 +Hash: a82dbd8d6c7a22df1cafa82dbd8d6c7a22df1caf Child fitting: - Hash: 1d3bfcee111df03fa625 + Hash: a82dbd8d6c7a22df1caf Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names - 706f97eb6a2b8fb1a17e.js 1.05 KiB 0 [emitted] - a65f8652fd07c12d0049.js 9.92 KiB 1 [emitted] - 4c485a9e1dc58eedfbd1.js 1.94 KiB 2 [emitted] - 337c857e3e34cc5ef72d.js 1.94 KiB 3 [emitted] - Entrypoint main = 4c485a9e1dc58eedfbd1.js 337c857e3e34cc5ef72d.js a65f8652fd07c12d0049.js - chunk {0} 706f97eb6a2b8fb1a17e.js 916 bytes <{1}> <{2}> <{3}> + fb95acf7c457672e70d0.js 1.05 KiB 0 [emitted] + a1e683753eca705a0882.js 9.92 KiB 1 [emitted] + d43339a3d0f86c6b8d90.js 1.94 KiB 2 [emitted] + 6c7fb52c5514dbfbf094.js 1.94 KiB 3 [emitted] + Entrypoint main = d43339a3d0f86c6b8d90.js 6c7fb52c5514dbfbf094.js a1e683753eca705a0882.js + chunk {0} fb95acf7c457672e70d0.js 916 bytes <{1}> <{2}> <{3}> > ./g [4] ./index.js 7:0-13 [7] ./g.js 916 bytes {0} [built] - chunk {1} a65f8652fd07c12d0049.js 1.87 KiB ={2}= ={3}= >{0}< [entry] [rendered] + chunk {1} a1e683753eca705a0882.js 1.87 KiB ={2}= ={3}= >{0}< [entry] [rendered] > ./index main [3] ./e.js 899 bytes {1} [built] [4] ./index.js 111 bytes {1} [built] [6] ./f.js 900 bytes {1} [built] - chunk {2} 4c485a9e1dc58eedfbd1.js 1.76 KiB ={1}= ={3}= >{0}< [initial] [rendered] [recorded] aggressive splitted + chunk {2} d43339a3d0f86c6b8d90.js 1.76 KiB ={1}= ={3}= >{0}< [initial] [rendered] [recorded] aggressive splitted > ./index main [0] ./b.js 899 bytes {2} [built] [5] ./a.js 899 bytes {2} [built] - chunk {3} 337c857e3e34cc5ef72d.js 1.76 KiB ={1}= ={2}= >{0}< [initial] [rendered] [recorded] aggressive splitted + chunk {3} 6c7fb52c5514dbfbf094.js 1.76 KiB ={1}= ={2}= >{0}< [initial] [rendered] [recorded] aggressive splitted > ./index main [1] ./c.js 899 bytes {3} [built] [2] ./d.js 899 bytes {3} [built] Child content-change: - Hash: 1d3bfcee111df03fa625 + Hash: a82dbd8d6c7a22df1caf Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names - 706f97eb6a2b8fb1a17e.js 1.05 KiB 0 [emitted] - a65f8652fd07c12d0049.js 9.92 KiB 1 [emitted] - 4c485a9e1dc58eedfbd1.js 1.94 KiB 2 [emitted] - 337c857e3e34cc5ef72d.js 1.94 KiB 3 [emitted] - Entrypoint main = 4c485a9e1dc58eedfbd1.js 337c857e3e34cc5ef72d.js a65f8652fd07c12d0049.js - chunk {0} 706f97eb6a2b8fb1a17e.js 916 bytes <{1}> <{2}> <{3}> + fb95acf7c457672e70d0.js 1.05 KiB 0 [emitted] + a1e683753eca705a0882.js 9.92 KiB 1 [emitted] + d43339a3d0f86c6b8d90.js 1.94 KiB 2 [emitted] + 6c7fb52c5514dbfbf094.js 1.94 KiB 3 [emitted] + Entrypoint main = d43339a3d0f86c6b8d90.js 6c7fb52c5514dbfbf094.js a1e683753eca705a0882.js + chunk {0} fb95acf7c457672e70d0.js 916 bytes <{1}> <{2}> <{3}> > ./g [4] ./index.js 7:0-13 [7] ./g.js 916 bytes {0} [built] - chunk {1} a65f8652fd07c12d0049.js 1.87 KiB ={2}= ={3}= >{0}< [entry] [rendered] + chunk {1} a1e683753eca705a0882.js 1.87 KiB ={2}= ={3}= >{0}< [entry] [rendered] > ./index main [3] ./e.js 899 bytes {1} [built] [4] ./index.js 111 bytes {1} [built] [6] ./f.js 900 bytes {1} [built] - chunk {2} 4c485a9e1dc58eedfbd1.js 1.76 KiB ={1}= ={3}= >{0}< [initial] [rendered] [recorded] aggressive splitted + chunk {2} d43339a3d0f86c6b8d90.js 1.76 KiB ={1}= ={3}= >{0}< [initial] [rendered] [recorded] aggressive splitted > ./index main [0] ./b.js 899 bytes {2} [built] [5] ./a.js 899 bytes {2} [built] - chunk {3} 337c857e3e34cc5ef72d.js 1.76 KiB ={1}= ={2}= >{0}< [initial] [rendered] [recorded] aggressive splitted + chunk {3} 6c7fb52c5514dbfbf094.js 1.76 KiB ={1}= ={2}= >{0}< [initial] [rendered] [recorded] aggressive splitted > ./index main [1] ./c.js 899 bytes {3} [built] [2] ./d.js 899 bytes {3} [built] \ No newline at end of file diff --git a/test/statsCases/aggressive-splitting-on-demand/expected.txt b/test/statsCases/aggressive-splitting-on-demand/expected.txt index f6ce02e03..85f7729d4 100644 --- a/test/statsCases/aggressive-splitting-on-demand/expected.txt +++ b/test/statsCases/aggressive-splitting-on-demand/expected.txt @@ -1,61 +1,65 @@ -Hash: af168fd06ab994207f62 +Hash: ca712e9bc95207b9082e Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names -031881c6ced2f576ff79.js 1.94 KiB 5 [emitted] -ba1a8dd27d611254d495.js 1.93 KiB 0 [emitted] -81950df8ced1664c8037.js 1.96 KiB 2 [emitted] -2a7cf3b38962fac54bb9.js 1.94 KiB 3 [emitted] -acfde31fdfbd1bdb41c4.js 1.01 KiB 4 [emitted] -f4818881f9e5138ad8ac.js 1 KiB 1 [emitted] -93666bd6f2b79d06cb66.js 1.94 KiB 6, 7 [emitted] -a28f1d7d7367daaaf00a.js 1 KiB 7 [emitted] -1c507089c2c8ceb9757d.js 1.94 KiB 8 [emitted] -9ac0014114101e5f7d2c.js 1.94 KiB 9, 1 [emitted] -f507739d37522e79688a.js 8.38 KiB 10 [emitted] main -Entrypoint main = f507739d37522e79688a.js -chunk {0} ba1a8dd27d611254d495.js 1.76 KiB <{10}> ={1}= ={2}= ={3}= ={7}= ={9}= [recorded] aggressive splitted +620d3f8d9bdb989cde07.js 1.94 KiB 6, 7 [emitted] +4467a9f70ef8365bcb32.js 1.93 KiB 0 [emitted] +8debdc7e72b763a13e35.js 1.96 KiB 2 [emitted] +6a2c2702ac98f9f90db9.js 1.94 KiB 3, 1 [emitted] +258ba4b441feff644266.js 1.01 KiB 4 [emitted] +8ae4998ca98adb2a08ea.js 1.94 KiB 5 [emitted] +aafb9d82e452def4c3bb.js 1 KiB 1 [emitted] +344e13508b62e833aacf.js 1 KiB 7 [emitted] +2aaed192bbfbc2302c53.js 1.94 KiB 8 [emitted] +72e04d4eaed46d9aac4c.js 1.94 KiB 9 [emitted] +d20b83dfd7d0fd0c8793.js 8.41 KiB 10 [emitted] main +1165c0cca1ba14a506ff.js 1.94 KiB 11 [emitted] +Entrypoint main = d20b83dfd7d0fd0c8793.js +chunk {0} 4467a9f70ef8365bcb32.js 1.76 KiB <{10}> ={1}= ={2}= ={3}= ={7}= ={9}= [recorded] aggressive splitted > ./b ./d ./e ./f ./g [11] ./index.js 5:0-44 > ./b ./d ./e ./f ./g ./h ./i ./j ./k [11] ./index.js 6:0-72 [0] ./b.js 899 bytes {0} {5} [built] [1] ./d.js 899 bytes {0} {8} [built] -chunk {1} f4818881f9e5138ad8ac.js 899 bytes <{10}> ={0}= ={2}= ={8}= +chunk {1} aafb9d82e452def4c3bb.js 899 bytes <{10}> ={0}= ={2}= ={8}= > ./c ./d ./e [11] ./index.js 3:0-30 > ./b ./d ./e ./f ./g [11] ./index.js 5:0-44 - [2] ./e.js 899 bytes {1} {9} [built] -chunk {2} 81950df8ced1664c8037.js 1.76 KiB <{10}> ={0}= ={1}= ={3}= ={6}= ={7}= ={9}= [recorded] aggressive splitted + [2] ./e.js 899 bytes {1} {3} [built] +chunk {2} 8debdc7e72b763a13e35.js 1.76 KiB <{10}> ={0}= ={1}= ={11}= ={3}= ={6}= ={7}= ={9}= [recorded] aggressive splitted > ./f ./g ./h ./i ./j ./k [11] ./index.js 4:0-51 > ./b ./d ./e ./f ./g [11] ./index.js 5:0-44 > ./b ./d ./e ./f ./g ./h ./i ./j ./k [11] ./index.js 6:0-72 [3] ./f.js 899 bytes {2} [built] [4] ./g.js 901 bytes {2} [built] -chunk {3} 2a7cf3b38962fac54bb9.js 1.76 KiB <{10}> ={0}= ={2}= ={6}= ={7}= ={9}= [recorded] aggressive splitted - > ./f ./g ./h ./i ./j ./k [11] ./index.js 4:0-51 +chunk {3} 6a2c2702ac98f9f90db9.js 1.76 KiB <{10}> ={0}= ={2}= ={7}= ={9}= [rendered] [recorded] aggressive splitted > ./b ./d ./e ./f ./g ./h ./i ./j ./k [11] ./index.js 6:0-72 - [6] ./h.js 899 bytes {3} [built] - [7] ./i.js 899 bytes {3} [built] -chunk {4} acfde31fdfbd1bdb41c4.js 899 bytes <{10}> + [2] ./e.js 899 bytes {1} {3} [built] + [6] ./h.js 899 bytes {3} {11} [built] +chunk {4} 258ba4b441feff644266.js 899 bytes <{10}> > ./a [11] ./index.js 1:0-16 [10] ./a.js 899 bytes {4} [built] -chunk {5} 031881c6ced2f576ff79.js 1.76 KiB <{10}> +chunk {5} 8ae4998ca98adb2a08ea.js 1.76 KiB <{10}> > ./b ./c [11] ./index.js 2:0-23 [0] ./b.js 899 bytes {0} {5} [built] [5] ./c.js 899 bytes {5} {8} [built] -chunk {6} 93666bd6f2b79d06cb66.js 1.76 KiB <{10}> ={2}= ={3}= +chunk {6} 620d3f8d9bdb989cde07.js 1.76 KiB <{10}> ={11}= ={2}= > ./f ./g ./h ./i ./j ./k [11] ./index.js 4:0-51 [8] ./j.js 901 bytes {6} {9} [built] [9] ./k.js 899 bytes {6} {7} [built] -chunk {7} a28f1d7d7367daaaf00a.js 899 bytes <{10}> ={0}= ={2}= ={3}= ={9}= +chunk {7} 344e13508b62e833aacf.js 899 bytes <{10}> ={0}= ={2}= ={3}= ={9}= > ./b ./d ./e ./f ./g ./h ./i ./j ./k [11] ./index.js 6:0-72 [9] ./k.js 899 bytes {6} {7} [built] -chunk {8} 1c507089c2c8ceb9757d.js 1.76 KiB <{10}> ={1}= [recorded] aggressive splitted +chunk {8} 2aaed192bbfbc2302c53.js 1.76 KiB <{10}> ={1}= [recorded] aggressive splitted > ./c ./d ./e [11] ./index.js 3:0-30 [1] ./d.js 899 bytes {0} {8} [built] [5] ./c.js 899 bytes {5} {8} [built] -chunk {9} 9ac0014114101e5f7d2c.js 1.76 KiB <{10}> ={0}= ={2}= ={3}= ={7}= [recorded] aggressive splitted +chunk {9} 72e04d4eaed46d9aac4c.js 1.76 KiB <{10}> ={0}= ={2}= ={3}= ={7}= [rendered] [recorded] aggressive splitted > ./b ./d ./e ./f ./g ./h ./i ./j ./k [11] ./index.js 6:0-72 - [2] ./e.js 899 bytes {1} {9} [built] + [7] ./i.js 899 bytes {9} {11} [built] [8] ./j.js 901 bytes {6} {9} [built] -chunk {10} f507739d37522e79688a.js (main) 248 bytes >{0}< >{1}< >{2}< >{3}< >{4}< >{5}< >{6}< >{7}< >{8}< >{9}< [entry] +chunk {10} d20b83dfd7d0fd0c8793.js (main) 248 bytes >{0}< >{1}< >{11}< >{2}< >{3}< >{4}< >{5}< >{6}< >{7}< >{8}< >{9}< [entry] [rendered] > ./index main - [11] ./index.js 248 bytes {10} [built] \ No newline at end of file + [11] ./index.js 248 bytes {10} [built] +chunk {11} 1165c0cca1ba14a506ff.js 1.76 KiB <{10}> ={2}= ={6}= [rendered] [recorded] aggressive splitted + > ./f ./g ./h ./i ./j ./k [11] ./index.js 4:0-51 + [6] ./h.js 899 bytes {3} {11} [built] + [7] ./i.js 899 bytes {9} {11} [built] \ No newline at end of file diff --git a/test/statsCases/chunks-development/expected.txt b/test/statsCases/chunks-development/expected.txt index a0bbe9759..bdd52330c 100644 --- a/test/statsCases/chunks-development/expected.txt +++ b/test/statsCases/chunks-development/expected.txt @@ -1,4 +1,4 @@ -Hash: 5ce1f032cffdff8368b5 +Hash: e81afb52ad447e8765ab Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names diff --git a/test/statsCases/chunks/expected.txt b/test/statsCases/chunks/expected.txt index 0f438ee56..0ccb04b18 100644 --- a/test/statsCases/chunks/expected.txt +++ b/test/statsCases/chunks/expected.txt @@ -1,4 +1,4 @@ -Hash: 7870601bc1a1a4f9c4c1 +Hash: 4a1bda30edd6ae541ab2 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names diff --git a/test/statsCases/color-disabled/expected.txt b/test/statsCases/color-disabled/expected.txt index 2351c1b6e..0ad13b663 100644 --- a/test/statsCases/color-disabled/expected.txt +++ b/test/statsCases/color-disabled/expected.txt @@ -1,4 +1,4 @@ -Hash: 5ebdffcace96139575ac +Hash: 0b32ee714cee3c8b25d4 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names diff --git a/test/statsCases/color-enabled-custom/expected.txt b/test/statsCases/color-enabled-custom/expected.txt index 0f8ac7758..1e0a39645 100644 --- a/test/statsCases/color-enabled-custom/expected.txt +++ b/test/statsCases/color-enabled-custom/expected.txt @@ -1,4 +1,4 @@ -Hash: 5ebdffcace96139575ac +Hash: 0b32ee714cee3c8b25d4 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names diff --git a/test/statsCases/color-enabled/expected.txt b/test/statsCases/color-enabled/expected.txt index cff1a8a5f..3ff044bc1 100644 --- a/test/statsCases/color-enabled/expected.txt +++ b/test/statsCases/color-enabled/expected.txt @@ -1,4 +1,4 @@ -Hash: 5ebdffcace96139575ac +Hash: 0b32ee714cee3c8b25d4 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names diff --git a/test/statsCases/commons-chunk-min-size-0/expected.txt b/test/statsCases/commons-chunk-min-size-0/expected.txt index a75756eaa..28f5ce3d0 100644 --- a/test/statsCases/commons-chunk-min-size-0/expected.txt +++ b/test/statsCases/commons-chunk-min-size-0/expected.txt @@ -1,4 +1,4 @@ -Hash: 2a374ac6d98475951384 +Hash: cad25b99a073374722a7 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names diff --git a/test/statsCases/commons-chunk-min-size-Infinity/expected.txt b/test/statsCases/commons-chunk-min-size-Infinity/expected.txt index 01d57b0e0..134c24a20 100644 --- a/test/statsCases/commons-chunk-min-size-Infinity/expected.txt +++ b/test/statsCases/commons-chunk-min-size-Infinity/expected.txt @@ -1,4 +1,4 @@ -Hash: d86d9e4d7a615c762442 +Hash: c176225f44e51c7a39a4 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names diff --git a/test/statsCases/commons-plugin-issue-4980/expected.txt b/test/statsCases/commons-plugin-issue-4980/expected.txt index 2b0c41ec4..8cf1379bf 100644 --- a/test/statsCases/commons-plugin-issue-4980/expected.txt +++ b/test/statsCases/commons-plugin-issue-4980/expected.txt @@ -1,25 +1,25 @@ -Hash: cdd753ac70c5ff3b74bedd7e476c27a1777b4d27 +Hash: 1c62a4c91035f66150df2425703c4fe7d61799b3 Child - Hash: cdd753ac70c5ff3b74be + Hash: 1c62a4c91035f66150df Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names app.js 5.58 KiB 0 [emitted] app - vendor.a86979cc789cd5f9d78f.js 619 bytes 1 [emitted] vendor - Entrypoint app = vendor.a86979cc789cd5f9d78f.js app.js + vendor.c0e73bece4137a7015c2.js 619 bytes 1 [emitted] vendor + Entrypoint app = vendor.c0e73bece4137a7015c2.js app.js [./constants.js] 87 bytes {1} [built] [./entry-1.js] ./entry-1.js + 2 modules 190 bytes {0} [built] | ./entry-1.js 67 bytes [built] | ./submodule-a.js 59 bytes [built] | ./submodule-b.js 59 bytes [built] Child - Hash: dd7e476c27a1777b4d27 + Hash: 2425703c4fe7d61799b3 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names app.js 5.6 KiB 0 [emitted] app - vendor.a86979cc789cd5f9d78f.js 619 bytes 1 [emitted] vendor - Entrypoint app = vendor.a86979cc789cd5f9d78f.js app.js + vendor.c0e73bece4137a7015c2.js 619 bytes 1 [emitted] vendor + Entrypoint app = vendor.c0e73bece4137a7015c2.js app.js [./constants.js] 87 bytes {1} [built] [./entry-2.js] ./entry-2.js + 2 modules 197 bytes {0} [built] | ./entry-2.js 67 bytes [built] diff --git a/test/statsCases/define-plugin/expected.txt b/test/statsCases/define-plugin/expected.txt index 5e6ce8d03..09dbcefb9 100644 --- a/test/statsCases/define-plugin/expected.txt +++ b/test/statsCases/define-plugin/expected.txt @@ -1,6 +1,6 @@ -Hash: 40b9288c7b06181fe56c92fc98986ee18223c384 +Hash: 189d0d15eb46be80d1f9eaead63561588b554cc6 Child - Hash: 40b9288c7b06181fe56c + Hash: 189d0d15eb46be80d1f9 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names @@ -8,7 +8,7 @@ Child Entrypoint main = main.js [0] ./index.js 24 bytes {0} [built] Child - Hash: 92fc98986ee18223c384 + Hash: eaead63561588b554cc6 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names diff --git a/test/statsCases/exclude-with-loader/expected.txt b/test/statsCases/exclude-with-loader/expected.txt index 6a1fa77a8..cf00120b8 100644 --- a/test/statsCases/exclude-with-loader/expected.txt +++ b/test/statsCases/exclude-with-loader/expected.txt @@ -1,4 +1,4 @@ -Hash: 8ba560cc1610e1d6a812 +Hash: 8b3d74c47fe62d34ee43 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names diff --git a/test/statsCases/external/expected.txt b/test/statsCases/external/expected.txt index 44e5b822d..500460544 100644 --- a/test/statsCases/external/expected.txt +++ b/test/statsCases/external/expected.txt @@ -1,4 +1,4 @@ -Hash: bceb26d8b2be7c67df1d +Hash: 3386bd94ba1fc3ae7f29 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names diff --git a/test/statsCases/filter-warnings/expected.txt b/test/statsCases/filter-warnings/expected.txt index 8a3ccbb49..21f3dca25 100644 --- a/test/statsCases/filter-warnings/expected.txt +++ b/test/statsCases/filter-warnings/expected.txt @@ -1,6 +1,6 @@ -Hash: 29c7e69ca39c982193b929c7e69ca39c982193b929c7e69ca39c982193b929c7e69ca39c982193b929c7e69ca39c982193b929c7e69ca39c982193b929c7e69ca39c982193b929c7e69ca39c982193b929c7e69ca39c982193b929c7e69ca39c982193b929c7e69ca39c982193b929c7e69ca39c982193b929c7e69ca39c982193b9 +Hash: 544a1b5857637a949b33544a1b5857637a949b33544a1b5857637a949b33544a1b5857637a949b33544a1b5857637a949b33544a1b5857637a949b33544a1b5857637a949b33544a1b5857637a949b33544a1b5857637a949b33544a1b5857637a949b33544a1b5857637a949b33544a1b5857637a949b33544a1b5857637a949b33 Child - Hash: 29c7e69ca39c982193b9 + Hash: 544a1b5857637a949b33 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names @@ -20,49 +20,49 @@ Child Dropping unused function someRemoteUnUsedFunction4 [./a.js:6,0] Dropping unused function someRemoteUnUsedFunction5 [./a.js:7,0] Child - Hash: 29c7e69ca39c982193b9 + Hash: 544a1b5857637a949b33 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names bundle.js 2.19 KiB 0 [emitted] main Entrypoint main = bundle.js Child - Hash: 29c7e69ca39c982193b9 + Hash: 544a1b5857637a949b33 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names bundle.js 2.19 KiB 0 [emitted] main Entrypoint main = bundle.js Child - Hash: 29c7e69ca39c982193b9 + Hash: 544a1b5857637a949b33 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names bundle.js 2.19 KiB 0 [emitted] main Entrypoint main = bundle.js Child - Hash: 29c7e69ca39c982193b9 + Hash: 544a1b5857637a949b33 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names bundle.js 2.19 KiB 0 [emitted] main Entrypoint main = bundle.js Child - Hash: 29c7e69ca39c982193b9 + Hash: 544a1b5857637a949b33 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names bundle.js 2.19 KiB 0 [emitted] main Entrypoint main = bundle.js Child - Hash: 29c7e69ca39c982193b9 + Hash: 544a1b5857637a949b33 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names bundle.js 2.19 KiB 0 [emitted] main Entrypoint main = bundle.js Child - Hash: 29c7e69ca39c982193b9 + Hash: 544a1b5857637a949b33 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names @@ -82,7 +82,7 @@ Child Dropping unused function someRemoteUnUsedFunction4 [./a.js:6,0] Dropping unused function someRemoteUnUsedFunction5 [./a.js:7,0] Child - Hash: 29c7e69ca39c982193b9 + Hash: 544a1b5857637a949b33 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names @@ -102,7 +102,7 @@ Child Dropping unused function someRemoteUnUsedFunction4 [./a.js:6,0] Dropping unused function someRemoteUnUsedFunction5 [./a.js:7,0] Child - Hash: 29c7e69ca39c982193b9 + Hash: 544a1b5857637a949b33 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names @@ -122,7 +122,7 @@ Child Dropping unused function someRemoteUnUsedFunction4 [./a.js:6,0] Dropping unused function someRemoteUnUsedFunction5 [./a.js:7,0] Child - Hash: 29c7e69ca39c982193b9 + Hash: 544a1b5857637a949b33 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names @@ -142,7 +142,7 @@ Child Dropping unused function someRemoteUnUsedFunction4 [./a.js:6,0] Dropping unused function someRemoteUnUsedFunction5 [./a.js:7,0] Child - Hash: 29c7e69ca39c982193b9 + Hash: 544a1b5857637a949b33 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names @@ -162,7 +162,7 @@ Child Dropping unused function someRemoteUnUsedFunction4 [./a.js:6,0] Dropping unused function someRemoteUnUsedFunction5 [./a.js:7,0] Child - Hash: 29c7e69ca39c982193b9 + Hash: 544a1b5857637a949b33 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names diff --git a/test/statsCases/import-context-filter/expected.txt b/test/statsCases/import-context-filter/expected.txt index 0409ac977..01de86162 100644 --- a/test/statsCases/import-context-filter/expected.txt +++ b/test/statsCases/import-context-filter/expected.txt @@ -1,4 +1,4 @@ -Hash: 3812be209526ddc2730f +Hash: 20afe8e9eb9a69aecddb Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names diff --git a/test/statsCases/import-weak/expected.txt b/test/statsCases/import-weak/expected.txt index 330c3a009..89db3bb27 100644 --- a/test/statsCases/import-weak/expected.txt +++ b/test/statsCases/import-weak/expected.txt @@ -1,4 +1,4 @@ -Hash: a9db7f3b329c4330e089 +Hash: 1f9db3ad053a3687e3bb Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names diff --git a/test/statsCases/limit-chunk-count-plugin/expected.txt b/test/statsCases/limit-chunk-count-plugin/expected.txt index 52cd46d26..5062c302f 100644 --- a/test/statsCases/limit-chunk-count-plugin/expected.txt +++ b/test/statsCases/limit-chunk-count-plugin/expected.txt @@ -1,6 +1,6 @@ -Hash: 1c28a2310b8d6ad1d2eae9e095881f37f449e557b0dba9af2a29d62e7d950cfed055ea39eaf47f56 +Hash: 599eb45be3863921e183f90c7b21ae5c6e853a0df3a313c9918d7d712c3f113bf580db9e5c6196ce Child 1 chunks: - Hash: 1c28a2310b8d6ad1d2ea + Hash: 599eb45be3863921e183 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names @@ -14,7 +14,7 @@ Child 1 chunks: [4] ./d.js 22 bytes {0} [built] [5] ./e.js 22 bytes {0} [built] Child 2 chunks: - Hash: e9e095881f37f449e557 + Hash: f90c7b21ae5c6e853a0d Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names @@ -30,7 +30,7 @@ Child 2 chunks: chunk {1} bundle.js (main) 73 bytes >{0}< [entry] [rendered] [5] ./index.js 73 bytes {1} [built] Child 3 chunks: - Hash: b0dba9af2a29d62e7d95 + Hash: f3a313c9918d7d712c3f Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names @@ -48,7 +48,7 @@ Child 3 chunks: chunk {2} bundle.js (main) 73 bytes >{0}< >{1}< [entry] [rendered] [5] ./index.js 73 bytes {2} [built] Child 4 chunks: - Hash: 0cfed055ea39eaf47f56 + Hash: 113bf580db9e5c6196ce Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names diff --git a/test/statsCases/max-modules-default/expected.txt b/test/statsCases/max-modules-default/expected.txt index 8f9eb8e47..c888ec49f 100644 --- a/test/statsCases/max-modules-default/expected.txt +++ b/test/statsCases/max-modules-default/expected.txt @@ -1,4 +1,4 @@ -Hash: 0fd8ab10acd7dd67da45 +Hash: c5cf5ab0cc0a404f1acf Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names diff --git a/test/statsCases/max-modules/expected.txt b/test/statsCases/max-modules/expected.txt index ff575da13..a068d73d8 100644 --- a/test/statsCases/max-modules/expected.txt +++ b/test/statsCases/max-modules/expected.txt @@ -1,4 +1,4 @@ -Hash: 0fd8ab10acd7dd67da45 +Hash: c5cf5ab0cc0a404f1acf Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names diff --git a/test/statsCases/named-chunks-plugin-async/expected.txt b/test/statsCases/named-chunks-plugin-async/expected.txt index dccda5b41..78f3b1805 100644 --- a/test/statsCases/named-chunks-plugin-async/expected.txt +++ b/test/statsCases/named-chunks-plugin-async/expected.txt @@ -1,4 +1,4 @@ -Hash: 16c09fc31f1686ee930a +Hash: c5b0089a4015e8744f8e Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names diff --git a/test/statsCases/named-chunks-plugin/expected.txt b/test/statsCases/named-chunks-plugin/expected.txt index 13e6502ba..c5cf2bee3 100644 --- a/test/statsCases/named-chunks-plugin/expected.txt +++ b/test/statsCases/named-chunks-plugin/expected.txt @@ -1,4 +1,4 @@ -Hash: 8b9265d1f4b67c8201f5 +Hash: 5df55d54223f36cc303b Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names diff --git a/test/statsCases/no-emit-on-errors-plugin-with-child-error/expected.txt b/test/statsCases/no-emit-on-errors-plugin-with-child-error/expected.txt index 8e2e9d07c..386981976 100644 --- a/test/statsCases/no-emit-on-errors-plugin-with-child-error/expected.txt +++ b/test/statsCases/no-emit-on-errors-plugin-with-child-error/expected.txt @@ -1,4 +1,4 @@ -Hash: 6f576d572dc2e6e75ac3 +Hash: 885948e5541fff6e85ac Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names diff --git a/test/statsCases/optimize-chunks/expected.txt b/test/statsCases/optimize-chunks/expected.txt index 446f4f1c6..34f15dbf8 100644 --- a/test/statsCases/optimize-chunks/expected.txt +++ b/test/statsCases/optimize-chunks/expected.txt @@ -1,4 +1,4 @@ -Hash: 6032753dfe117b1c3893 +Hash: c4c4476c6d07e1bf7404 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names diff --git a/test/statsCases/preset-detailed/expected.txt b/test/statsCases/preset-detailed/expected.txt index a2576f9dd..b9479c247 100644 --- a/test/statsCases/preset-detailed/expected.txt +++ b/test/statsCases/preset-detailed/expected.txt @@ -1,4 +1,4 @@ -Hash: d748792ec03ede1f69dc +Hash: a181afd92c30187a0eba Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names diff --git a/test/statsCases/preset-normal/expected.txt b/test/statsCases/preset-normal/expected.txt index 322ddb915..8fd9bdd87 100644 --- a/test/statsCases/preset-normal/expected.txt +++ b/test/statsCases/preset-normal/expected.txt @@ -1,4 +1,4 @@ -Hash: d748792ec03ede1f69dc +Hash: a181afd92c30187a0eba Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names diff --git a/test/statsCases/preset-verbose/expected.txt b/test/statsCases/preset-verbose/expected.txt index e15daa8cd..50f688017 100644 --- a/test/statsCases/preset-verbose/expected.txt +++ b/test/statsCases/preset-verbose/expected.txt @@ -1,4 +1,4 @@ -Hash: d748792ec03ede1f69dc +Hash: a181afd92c30187a0eba Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names diff --git a/test/statsCases/resolve-plugin-context/expected.txt b/test/statsCases/resolve-plugin-context/expected.txt index 183e14eeb..4831d728b 100644 --- a/test/statsCases/resolve-plugin-context/expected.txt +++ b/test/statsCases/resolve-plugin-context/expected.txt @@ -1,4 +1,4 @@ -Hash: 20d34a938ae78cffd3f2 +Hash: 47eae06ebcb26f6b883a Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names diff --git a/test/statsCases/reverse-sort-modules/expected.txt b/test/statsCases/reverse-sort-modules/expected.txt index f2aeb6375..4280dd705 100644 --- a/test/statsCases/reverse-sort-modules/expected.txt +++ b/test/statsCases/reverse-sort-modules/expected.txt @@ -1,4 +1,4 @@ -Hash: 0fd8ab10acd7dd67da45 +Hash: c5cf5ab0cc0a404f1acf Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names diff --git a/test/statsCases/scope-hoisting-bailouts/expected.txt b/test/statsCases/scope-hoisting-bailouts/expected.txt index bb6ecb35e..9a7291212 100644 --- a/test/statsCases/scope-hoisting-bailouts/expected.txt +++ b/test/statsCases/scope-hoisting-bailouts/expected.txt @@ -1,4 +1,4 @@ -Hash: 8ea520d39e2a8caaf145 +Hash: 2f9dacd48c09c3072b04 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Entrypoint index = index.js diff --git a/test/statsCases/scope-hoisting-multi/expected.txt b/test/statsCases/scope-hoisting-multi/expected.txt index d7e2883f8..18d84f35c 100644 --- a/test/statsCases/scope-hoisting-multi/expected.txt +++ b/test/statsCases/scope-hoisting-multi/expected.txt @@ -1,6 +1,6 @@ -Hash: f987d10439866c1320274e05ad6ebdcc88f97d91 +Hash: 1e05cb63c83229a31d7fe3bbe6aa8fb8e8ec3bd9 Child - Hash: f987d10439866c132027 + Hash: 1e05cb63c83229a31d7f Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Entrypoint first = vendor.js first.js @@ -17,7 +17,7 @@ Child [9] ./module_first.js 31 bytes {4} [built] [10] ./second.js 177 bytes {5} [built] Child - Hash: 4e05ad6ebdcc88f97d91 + Hash: e3bbe6aa8fb8e8ec3bd9 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Entrypoint first = vendor.js first.js diff --git a/test/statsCases/simple-more-info/expected.txt b/test/statsCases/simple-more-info/expected.txt index 9c59b74cf..b1a4338fb 100644 --- a/test/statsCases/simple-more-info/expected.txt +++ b/test/statsCases/simple-more-info/expected.txt @@ -1,4 +1,4 @@ -Hash: 1911bed74c47698d017f +Hash: ee367da3e170c28a39bf Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names diff --git a/test/statsCases/simple/expected.txt b/test/statsCases/simple/expected.txt index 0ffbd4990..e48aa187f 100644 --- a/test/statsCases/simple/expected.txt +++ b/test/statsCases/simple/expected.txt @@ -1,4 +1,4 @@ -Hash: f0bbd0723c33cf044c2f +Hash: 18342b523b0aca4784a6 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names diff --git a/test/statsCases/split-chunks/expected.txt b/test/statsCases/split-chunks/expected.txt index 834f44369..ea21d7047 100644 --- a/test/statsCases/split-chunks/expected.txt +++ b/test/statsCases/split-chunks/expected.txt @@ -192,10 +192,10 @@ Child manual: [5] ./c.js 72 bytes {4} {8} [built] Child name-too-long: Entrypoint main = main.js - Entrypoint aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa = vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~716093be.js vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.js aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.js - Entrypoint bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb = vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~716093be.js vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.js bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.js - Entrypoint cccccccccccccccccccccccccccccc = vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~716093be.js vendors~async-c~cccccccccccccccccccccccccccccc.js cccccccccccccccccccccccccccccc.js - chunk {0} vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~716093be.js (vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~716093be) 20 bytes <{9}> ={1}= ={10}= ={11}= ={12}= ={2}= ={3}= ={4}= ={6}= ={7}= ={8}= >{2}< >{5}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~716093be) + Entrypoint aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa = vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~50ebc41f.js vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.js aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.js + Entrypoint bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb = vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~50ebc41f.js vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.js bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.js + Entrypoint cccccccccccccccccccccccccccccc = vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~50ebc41f.js vendors~async-c~cccccccccccccccccccccccccccccc.js cccccccccccccccccccccccccccccc.js + chunk {0} vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~50ebc41f.js (vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~50ebc41f) 20 bytes <{9}> ={1}= ={10}= ={11}= ={12}= ={2}= ={3}= ={4}= ={6}= ={7}= ={8}= >{2}< >{5}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~50ebc41f) > ./a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa > ./b bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb > ./c cccccccccccccccccccccccccccccc @@ -203,7 +203,7 @@ Child name-too-long: > ./b [8] ./index.js 2:0-47 > ./c [8] ./index.js 3:0-47 [2] ./node_modules/x.js 20 bytes {0} [built] - chunk {1} aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccc~e7d53185.js (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccc~e7d53185) 20 bytes <{9}> ={0}= ={2}= ={3}= ={4}= ={6}= ={7}= ={8}= >{2}< >{5}< [rendered] split chunk (cache group: default) (name: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccc~e7d53185) + chunk {1} aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccc~18066793.js (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccc~18066793) 20 bytes <{9}> ={0}= ={2}= ={3}= ={4}= ={6}= ={7}= ={8}= >{2}< >{5}< [rendered] split chunk (cache group: default) (name: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccc~18066793) > ./a [8] ./index.js 1:0-47 > ./b [8] ./index.js 2:0-47 > ./c [8] ./index.js 3:0-47 diff --git a/test/statsCases/tree-shaking/expected.txt b/test/statsCases/tree-shaking/expected.txt index 5615b339f..6941c6aa0 100644 --- a/test/statsCases/tree-shaking/expected.txt +++ b/test/statsCases/tree-shaking/expected.txt @@ -1,4 +1,4 @@ -Hash: 612f7baf263b811351ca +Hash: 6877ac726b04eb5d7985 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names diff --git a/test/statsCases/warnings-uglifyjs/expected.txt b/test/statsCases/warnings-uglifyjs/expected.txt index 5d82023e8..044ffe43c 100644 --- a/test/statsCases/warnings-uglifyjs/expected.txt +++ b/test/statsCases/warnings-uglifyjs/expected.txt @@ -1,4 +1,4 @@ -Hash: 646a540e1a95f55e1b8c +Hash: 2d94d00e348948925d75 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names From 72477f4d6f9dfd5efe83216b3b569128d6e36941 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Thu, 22 Feb 2018 18:36:41 +0100 Subject: [PATCH 106/112] upgrade versions to stable versions --- package.json | 4 ++-- yarn.lock | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 59db12af5..30eb7059c 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "ajv": "^6.1.0", "ajv-keywords": "^3.1.0", "chrome-trace-event": "^0.1.1", - "enhanced-resolve": "^4.0.0-beta.2", + "enhanced-resolve": "^4.0.0", "eslint-scope": "^3.7.1", "loader-runner": "^2.3.0", "loader-utils": "^1.1.0", @@ -19,7 +19,7 @@ "neo-async": "^2.5.0", "node-libs-browser": "^2.0.0", "schema-utils": "^0.4.2", - "tapable": "^1.0.0-beta.5", + "tapable": "^1.0.0", "uglifyjs-webpack-plugin": "^1.1.1", "watchpack": "^1.4.0", "webpack-sources": "^1.0.1" diff --git a/yarn.lock b/yarn.lock index bfa39cfcf..a35d26198 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1155,13 +1155,13 @@ end-of-stream@^1.0.0, end-of-stream@^1.1.0: dependencies: once "^1.4.0" -enhanced-resolve@^4.0.0-beta.2: - version "4.0.0-beta.2" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-4.0.0-beta.2.tgz#a13a9da2340712c4f3dacf27e26717e2eae69c24" +enhanced-resolve@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-4.0.0.tgz#e34a6eaa790f62fccd71d93959f56b2b432db10a" dependencies: graceful-fs "^4.1.2" memory-fs "^0.4.0" - tapable "^1.0.0-beta.4" + tapable "^1.0.0" errno@^0.1.1, errno@^0.1.3, errno@^0.1.4: version "0.1.6" @@ -4002,9 +4002,9 @@ table@^4.0.1: slice-ansi "1.0.0" string-width "^2.1.1" -tapable@^1.0.0-beta.4, tapable@^1.0.0-beta.5: - version "1.0.0-beta.5" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.0.0-beta.5.tgz#9bc844b856487e03345b7d3361288aefd97f8303" +tapable@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.0.0.tgz#cbb639d9002eed9c6b5975eb20598d7936f1f9f2" tar-pack@^3.4.0: version "3.4.1" From 06375310472cc25c1e3120837480220bc9ffafd2 Mon Sep 17 00:00:00 2001 From: Josh Unger Date: Fri, 23 Feb 2018 18:22:37 -0500 Subject: [PATCH 107/112] Add a hyperlink to create a new issue and fix case of Github to GitHub. --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a8f50bfba..369ab7a85 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -13,7 +13,7 @@ If you are still having difficulty after looking over your configuration careful a question to [StackOverflow with the webpack tag](http://stackoverflow.com/tags/webpack). Questions that include your webpack.config.js and relevant files are more likely to receive responses. -**If you have discovered a bug or have a feature suggestion, feel free to create an issue on Github.** +**If you have discovered a bug or have a feature suggestion, please [create an issue on GitHub](https://github.com/webpack/webpack/issues/new).** ## Contributing to the webpack ecosystem From 39438c7fe828e04575d0ead2a7be1687411fd382 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Sat, 24 Feb 2018 13:12:26 +0100 Subject: [PATCH 108/112] unittest now also walks the ast --- test/Parser.unittest.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/Parser.unittest.js b/test/Parser.unittest.js index 15d3a1225..329017834 100644 --- a/test/Parser.unittest.js +++ b/test/Parser.unittest.js @@ -471,10 +471,11 @@ describe("Parser", () => { "await expression": "async function x(y) { await y }", "await iteration": "async function f() { for await (x of xs); }" }; + const parser = new Parser(); Object.keys(cases).forEach((name) => { const expr = cases[name]; it(name, () => { - const actual = Parser.parse(expr); + const actual = parser.parse(expr); should.strictEqual(typeof actual, "object"); }); }); From b0949cb2d26193bc4d384852927f00e51db1a824 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Sat, 24 Feb 2018 13:12:38 +0100 Subject: [PATCH 109/112] add integration test for spread operator --- test/cases/parsing/spread/a.js | 1 + test/cases/parsing/spread/index.js | 11 +++++++++++ test/cases/parsing/spread/module.js | 6 ++++++ test/cases/parsing/spread/test.filter.js | 5 +++++ test/helpers/supportsSpread.js | 9 +++++++++ 5 files changed, 32 insertions(+) create mode 100644 test/cases/parsing/spread/a.js create mode 100644 test/cases/parsing/spread/index.js create mode 100644 test/cases/parsing/spread/module.js create mode 100644 test/cases/parsing/spread/test.filter.js create mode 100644 test/helpers/supportsSpread.js diff --git a/test/cases/parsing/spread/a.js b/test/cases/parsing/spread/a.js new file mode 100644 index 000000000..f74a2f2b5 --- /dev/null +++ b/test/cases/parsing/spread/a.js @@ -0,0 +1 @@ +module.exports = "ok"; diff --git a/test/cases/parsing/spread/index.js b/test/cases/parsing/spread/index.js new file mode 100644 index 000000000..924a2c7e7 --- /dev/null +++ b/test/cases/parsing/spread/index.js @@ -0,0 +1,11 @@ +import X, { A, B } from "./module"; +import * as M from "./module"; + +it("should support spread operator", function() { + var o1 = { ...X }; + o1.should.be.eql({ A: "A", B: "B" }); + var o2 = { ...({ X }) }; + o2.should.be.eql({ X: { A: "A", B: "B" } }); + var o3 = { ...M }; + o3.should.be.eql({ default: { A: "A", B: "B" }, A: "A", B: "B" }); +}); diff --git a/test/cases/parsing/spread/module.js b/test/cases/parsing/spread/module.js new file mode 100644 index 000000000..7a590ef8e --- /dev/null +++ b/test/cases/parsing/spread/module.js @@ -0,0 +1,6 @@ +const A = "A"; +const B = "B"; + +export default { A, B }; + +export { A, B }; diff --git a/test/cases/parsing/spread/test.filter.js b/test/cases/parsing/spread/test.filter.js new file mode 100644 index 000000000..741b76b8c --- /dev/null +++ b/test/cases/parsing/spread/test.filter.js @@ -0,0 +1,5 @@ +var supportsSpread = require("../../../helpers/supportsSpread"); + +module.exports = function(config) { + return supportsSpread(); +}; diff --git a/test/helpers/supportsSpread.js b/test/helpers/supportsSpread.js new file mode 100644 index 000000000..3ea317b61 --- /dev/null +++ b/test/helpers/supportsSpread.js @@ -0,0 +1,9 @@ +module.exports = function supportsSpread() { + try { + var x = { a: true }, y; // eslint-disable-line no-unused-vars + eval("y = { ...x }"); + return y !== x && y.a; + } catch(e) { + return false; + } +}; From 6bf5df53a304512d845cfffa78799416f3c92012 Mon Sep 17 00:00:00 2001 From: Naveen Jain Date: Wed, 21 Feb 2018 19:51:05 +0530 Subject: [PATCH 110/112] Fixed template.md --- examples/multiple-entry-points/README.md | 14 +++++++------- examples/multiple-entry-points/template.md | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/examples/multiple-entry-points/README.md b/examples/multiple-entry-points/README.md index ff024dbfb..78770d452 100644 --- a/examples/multiple-entry-points/README.md +++ b/examples/multiple-entry-points/README.md @@ -4,15 +4,15 @@ In this example you have two (HTML) pages `pageA` and `pageB`. You want to creat You can see how to define multiple entry points via the `entry` option. -You can use +You can use You can see the output files: * `commons.js` contains: - * the module system - * chunk loading logic * module `common.js` which is used in both pages * `pageA.js` contains: (`pageB.js` is similar) + * the module system + * chunk loading logic * the entry point `pageA.js` * it would contain any other module that is only used by `pageA` * `0.chunk.js` is an additional chunk which is used by both pages. It contains: @@ -572,7 +572,7 @@ module.exports = function(msg) { ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.2 +Version: webpack 4.0.0-beta.1 Asset Size Chunks Chunk Names 0.js 363 bytes 0 [emitted] commons.js 267 bytes 1 [emitted] commons @@ -588,8 +588,8 @@ chunk {0} 0.js 91 bytes <{1}> <{2}> <{3}> [rendered] cjs require ./shared [2] ./pageB.js 3:14-33 amd require ./shared [3] ./pageA.js 2:0-4:2 chunk {1} commons.js (commons) 26 bytes ={2}= ={3}= >{0}< [initial] [rendered] split chunk (cache group: commons) (name: commons) - > ./pageA pageA > ./pageB pageB + > ./pageA pageA [1] ./common.js 26 bytes {1} [built] cjs require ./common [0] ./shared.js 1:13-32 cjs require ./common [2] ./pageB.js 1:13-32 @@ -608,7 +608,7 @@ chunk {3} pageA.js (pageA) 108 bytes ={1}= >{0}< [entry] [rendered] ``` Hash: 0a1b2c3d4e5f6a7b8c9d -Version: webpack 4.0.0-beta.2 +Version: webpack 4.0.0-beta.1 Asset Size Chunks Chunk Names 0.js 120 bytes 0 [emitted] commons.js 95 bytes 1 [emitted] commons @@ -624,8 +624,8 @@ chunk {0} 0.js 91 bytes <{1}> <{2}> <{3}> [rendered] cjs require ./shared [2] ./pageB.js 3:14-33 amd require ./shared [3] ./pageA.js 2:0-4:2 chunk {1} commons.js (commons) 26 bytes ={2}= ={3}= >{0}< [initial] [rendered] split chunk (cache group: commons) (name: commons) - > ./pageA pageA > ./pageB pageB + > ./pageA pageA [1] ./common.js 26 bytes {1} [built] cjs require ./common [0] ./shared.js 1:13-32 cjs require ./common [2] ./pageB.js 1:13-32 diff --git a/examples/multiple-entry-points/template.md b/examples/multiple-entry-points/template.md index 5a6074a96..4b0ea594b 100644 --- a/examples/multiple-entry-points/template.md +++ b/examples/multiple-entry-points/template.md @@ -4,15 +4,15 @@ In this example you have two (HTML) pages `pageA` and `pageB`. You want to creat You can see how to define multiple entry points via the `entry` option. -You can use +You can use You can see the output files: * `commons.js` contains: - * the module system - * chunk loading logic * module `common.js` which is used in both pages * `pageA.js` contains: (`pageB.js` is similar) + * the module system + * chunk loading logic * the entry point `pageA.js` * it would contain any other module that is only used by `pageA` * `0.chunk.js` is an additional chunk which is used by both pages. It contains: From e52f323750d3780980ef154bdec1ec0362b315e1 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Sat, 24 Feb 2018 14:31:18 +0100 Subject: [PATCH 111/112] optimize performance of assignDepth --- lib/Compilation.js | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/lib/Compilation.js b/lib/Compilation.js index 6fcbf42e0..c3e34ba70 100644 --- a/lib/Compilation.js +++ b/lib/Compilation.js @@ -1007,45 +1007,44 @@ class Compilation extends Tapable { } assignDepth(module) { - const assignDepthToModule = (module, depth) => { - // enter module - if(typeof module.depth === "number" && module.depth <= depth) return; - module.depth = depth; + const queue = new Set([module]); + let depth; - // enter it as block - assignDepthToDependencyBlock(module, depth + 1); + module.depth = 0; + + const enqueueJob = module => { + const d = module.depth; + if(typeof d === "number" && d <= depth) return; + queue.add(module); + module.depth = depth; }; const assignDepthToDependency = (dependency, depth) => { if(dependency.module) { - queue.push(() => assignDepthToModule(dependency.module, depth)); + enqueueJob(dependency.module); } }; - const assignDepthToDependencyBlock = (block, depth) => { - const iteratorDependency = d => assignDepthToDependency(d, depth); - - const iteratorBlock = b => assignDepthToDependencyBlock(b, depth); - + const assignDepthToDependencyBlock = block => { if(block.variables) { - iterationBlockVariable(block.variables, iteratorDependency); + iterationBlockVariable(block.variables, assignDepthToDependency); } if(block.dependencies) { - iterationOfArrayCallback(block.dependencies, iteratorDependency); + iterationOfArrayCallback(block.dependencies, assignDepthToDependency); } if(block.blocks) { - iterationOfArrayCallback(block.blocks, iteratorBlock); + iterationOfArrayCallback(block.blocks, assignDepthToDependencyBlock); } }; - const queue = [() => { - assignDepthToModule(module, 0); - }]; + for(module of queue) { + queue.delete(module); + depth = module.depth; - while(queue.length) { - queue.pop()(); + depth++; + assignDepthToDependencyBlock(module); } } From 4c25bfbaf2e01cf23708a381319b43367701e5b5 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Sat, 24 Feb 2018 15:55:43 +0100 Subject: [PATCH 112/112] 4.0.0-beta.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5e9898030..ced0fbaf2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "webpack", - "version": "4.0.0-beta.2", + "version": "4.0.0-beta.3", "author": "Tobias Koppers @sokra", "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.", "license": "MIT",