diff --git a/bin/webpack.js b/bin/webpack.js old mode 100755 new mode 100644 index 7bed86add..3c41d5b6e --- a/bin/webpack.js +++ b/bin/webpack.js @@ -134,6 +134,11 @@ yargs.options({ group: DISPLAY_GROUP, describe: "Display details about errors" }, + "display": { + type: "string", + group: DISPLAY_GROUP, + describe: "Select display preset (verbose, detailed, normal, minimal, errors-only, none)" + }, "verbose": { type: "boolean", group: DISPLAY_GROUP, @@ -144,16 +149,7 @@ yargs.options({ var argv = yargs.argv; if(argv.verbose) { - argv["display-reasons"] = true; - argv["display-depth"] = true; - argv["display-entrypoints"] = true; - argv["display-used-exports"] = true; - argv["display-provided-exports"] = true; - argv["display-optimization-bailout"] = true; - argv["display-error-details"] = true; - argv["display-modules"] = true; - argv["display-cached"] = true; - argv["display-cached-assets"] = true; + argv["display"] = "verbose"; } var options = require("./convert-argv")(yargs, argv); @@ -187,6 +183,11 @@ function processOptions(options) { } else if(!outputOptions) { outputOptions = {}; } + + ifArg("display", function(preset) { + outputOptions = statsPresetToOptions(preset); + }); + outputOptions = Object.create(outputOptions); if(Array.isArray(options) && !outputOptions.children) { outputOptions.children = options.map(o => o.stats); @@ -225,28 +226,36 @@ function processOptions(options) { outputOptions.cachedAssets = false; ifArg("display-chunks", function(bool) { - outputOptions.modules = !bool; - outputOptions.chunks = bool; + if(bool) { + outputOptions.modules = false; + outputOptions.chunks = true; + outputOptions.chunkModules = true; + } }); ifArg("display-entrypoints", function(bool) { - outputOptions.entrypoints = bool; + if(bool) + outputOptions.entrypoints = true; }); ifArg("display-reasons", function(bool) { - outputOptions.reasons = bool; + if(bool) + outputOptions.reasons = true; }); ifArg("display-depth", function(bool) { - outputOptions.depth = bool; + if(bool) + outputOptions.depth = true; }); ifArg("display-used-exports", function(bool) { - outputOptions.usedExports = bool; + if(bool) + outputOptions.usedExports = true; }); ifArg("display-provided-exports", function(bool) { - outputOptions.providedExports = bool; + if(bool) + outputOptions.providedExports = true; }); ifArg("display-optimization-bailout", function(bool) { @@ -254,11 +263,13 @@ function processOptions(options) { }); ifArg("display-error-details", function(bool) { - outputOptions.errorDetails = bool; + if(bool) + outputOptions.errorDetails = true; }); ifArg("display-origins", function(bool) { - outputOptions.chunkOrigins = bool; + if(bool) + outputOptions.chunkOrigins = true; }); ifArg("display-max-modules", function(value) { @@ -282,21 +293,6 @@ function processOptions(options) { outputOptions.maxModules = Infinity; outputOptions.exclude = undefined; } - } else { - if(typeof outputOptions.chunks === "undefined") - outputOptions.chunks = true; - if(typeof outputOptions.entrypoints === "undefined") - outputOptions.entrypoints = true; - if(typeof outputOptions.modules === "undefined") - outputOptions.modules = true; - if(typeof outputOptions.chunkModules === "undefined") - outputOptions.chunkModules = true; - if(typeof outputOptions.reasons === "undefined") - outputOptions.reasons = true; - if(typeof outputOptions.cached === "undefined") - outputOptions.cached = true; - if(typeof outputOptions.cachedAssets === "undefined") - outputOptions.cachedAssets = true; } ifArg("hide-modules", function(bool) { @@ -347,7 +343,9 @@ function processOptions(options) { process.stdout.write(JSON.stringify(stats.toJson(outputOptions), null, 2) + "\n"); } else if(stats.hash !== lastHash) { lastHash = stats.hash; - process.stdout.write(stats.toString(outputOptions) + "\n"); + var statsString = stats.toString(outputOptions); + if(statsString) + process.stdout.write(statsString + "\n"); } if(!options.watch && stats.hasErrors()) { process.on("exit", function() { diff --git a/lib/Stats.js b/lib/Stats.js index d78bb4ac6..75ec6bd4f 100644 --- a/lib/Stats.js +++ b/lib/Stats.js @@ -8,7 +8,7 @@ const RequestShortener = require("./RequestShortener"); const SizeFormatHelpers = require("./SizeFormatHelpers"); const formatLocation = require("./formatLocation"); -const optionOrFallback = (optionValue, fallbackValue) => optionValue !== undefined ? optionValue : fallbackValue; +const optionOrFallback = (optionValue, fallbackValue) => typeof optionValue !== "undefined" ? optionValue : fallbackValue; class Stats { constructor(compilation) { @@ -75,51 +75,62 @@ class Stats { options = {}; } + const optionOrLocalFallback = (v, def) => + typeof v !== "undefined" ? v : + typeof options.all !== "undefined" ? options.all : def; + const compilation = this.compilation; const requestShortener = new RequestShortener(optionOrFallback(options.context, process.cwd())); - const showPerformance = optionOrFallback(options.performance, true); - const showHash = optionOrFallback(options.hash, true); - const showVersion = optionOrFallback(options.version, true); - const showTimings = optionOrFallback(options.timings, true); - const showAssets = optionOrFallback(options.assets, true); - const showEntrypoints = optionOrFallback(options.entrypoints, !forToString); - const showChunks = optionOrFallback(options.chunks, true); - const showChunkModules = optionOrFallback(options.chunkModules, !!forToString); - const showChunkOrigins = optionOrFallback(options.chunkOrigins, !forToString); - const showModules = optionOrFallback(options.modules, !forToString); - const showDepth = optionOrFallback(options.depth, !forToString); - const showCachedModules = optionOrFallback(options.cached, true); - const showCachedAssets = optionOrFallback(options.cachedAssets, true); - const showReasons = optionOrFallback(options.reasons, !forToString); - const showUsedExports = optionOrFallback(options.usedExports, !forToString); - const showProvidedExports = optionOrFallback(options.providedExports, !forToString); - const showOptimizationBailout = optionOrFallback(options.optimizationBailout, !forToString); - const showChildren = optionOrFallback(options.children, true); - const showSource = optionOrFallback(options.source, !forToString); - const showModuleTrace = optionOrFallback(options.moduleTrace, true); - const showErrors = optionOrFallback(options.errors, true); - const showErrorDetails = optionOrFallback(options.errorDetails, !forToString); - const showWarnings = optionOrFallback(options.warnings, true); + const showPerformance = optionOrLocalFallback(options.performance, true); + const showHash = optionOrLocalFallback(options.hash, true); + const showVersion = optionOrLocalFallback(options.version, true); + const showTimings = optionOrLocalFallback(options.timings, true); + const showAssets = optionOrLocalFallback(options.assets, true); + const showEntrypoints = optionOrLocalFallback(options.entrypoints, !forToString); + const showChunks = optionOrLocalFallback(options.chunks, !forToString); + const showChunkModules = optionOrLocalFallback(options.chunkModules, !!forToString); + const showChunkOrigins = optionOrLocalFallback(options.chunkOrigins, !forToString); + const showModules = optionOrLocalFallback(options.modules, true); + const showDepth = optionOrLocalFallback(options.depth, !forToString); + const showCachedModules = optionOrLocalFallback(options.cached, true); + const showCachedAssets = optionOrLocalFallback(options.cachedAssets, true); + const showReasons = optionOrLocalFallback(options.reasons, !forToString); + const showUsedExports = optionOrLocalFallback(options.usedExports, !forToString); + const showProvidedExports = optionOrLocalFallback(options.providedExports, !forToString); + const showOptimizationBailout = optionOrLocalFallback(options.optimizationBailout, !forToString); + const showChildren = optionOrLocalFallback(options.children, true); + const showSource = optionOrLocalFallback(options.source, !forToString); + const showModuleTrace = optionOrLocalFallback(options.moduleTrace, true); + const showErrors = optionOrLocalFallback(options.errors, true); + const showErrorDetails = optionOrLocalFallback(options.errorDetails, !forToString); + const showWarnings = optionOrLocalFallback(options.warnings, true); const warningsFilter = optionOrFallback(options.warningsFilter, null); - const showPublicPath = optionOrFallback(options.publicPath, !forToString); - const excludeModules = [].concat(optionOrFallback(options.exclude, [])).map(str => { - if(typeof str !== "string") return str; - return new RegExp(`[\\\\/]${str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&")}([\\\\/]|$|!|\\?)`); + const showPublicPath = optionOrLocalFallback(options.publicPath, !forToString); + const excludeModules = [].concat(optionOrFallback(options.exclude, [])).map(item => { + if(typeof item === "string") { + const regExp = new RegExp(`[\\\\/]${item.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&")}([\\\\/]|$|!|\\?)`); + return ident => regExp.test(ident); + } + if(item && typeof item === "object" && typeof item.test === "function") + return ident => item.test(ident); + if(typeof item === "function") + return item; }); const maxModules = optionOrFallback(options.maxModules, forToString ? 15 : Infinity); const sortModules = optionOrFallback(options.modulesSort, "id"); const sortChunks = optionOrFallback(options.chunksSort, "id"); const sortAssets = optionOrFallback(options.assetsSort, ""); + if(!showCachedModules) { + excludeModules.push((ident, module) => !module.built); + } + const createModuleFilter = () => { let i = 0; return module => { - if(!showCachedModules && !module.built) { - return false; - } if(excludeModules.length > 0) { const ident = requestShortener.shorten(module.resource); - const excluded = excludeModules.some(regExp => regExp.test(ident)); + const excluded = excludeModules.some(fn => fn(ident, module)); if(excluded) return false; } @@ -699,6 +710,35 @@ class Stats { } }; + const processModulesList = (obj, prefix) => { + if(obj.modules) { + obj.modules.forEach(module => { + colors.normal(prefix); + if(module.id < 1000) colors.normal(" "); + if(module.id < 100) colors.normal(" "); + if(module.id < 10) colors.normal(" "); + colors.normal("["); + colors.normal(module.id); + colors.normal("] "); + colors.bold(module.name || module.identifier); + processModuleAttributes(module); + newline(); + processModuleContent(module, prefix + " "); + }); + if(obj.filteredModules > 0) { + colors.normal(prefix); + colors.normal(" "); + if(obj.modules.length > 0) + colors.normal(" + "); + colors.normal(obj.filteredModules); + if(obj.modules.length > 0) + colors.normal(" hidden"); + colors.normal(obj.filteredModules !== 1 ? " modules" : " module"); + newline(); + } + } + }; + if(obj.chunks) { obj.chunks.forEach(chunk => { colors.normal("chunk "); @@ -760,45 +800,11 @@ class Stats { newline(); }); } - if(chunk.modules) { - chunk.modules.forEach(module => { - colors.normal(" "); - if(module.id < 1000) colors.normal(" "); - if(module.id < 100) colors.normal(" "); - if(module.id < 10) colors.normal(" "); - colors.normal("["); - colors.normal(module.id); - colors.normal("] "); - colors.bold(module.name); - processModuleAttributes(module); - newline(); - processModuleContent(module, " "); - }); - if(chunk.filteredModules > 0) { - colors.normal(` + ${chunk.filteredModules} hidden modules`); - newline(); - } - } + processModulesList(chunk, " "); }); } - if(obj.modules) { - obj.modules.forEach(module => { - if(module.id < 1000) colors.normal(" "); - if(module.id < 100) colors.normal(" "); - if(module.id < 10) colors.normal(" "); - colors.normal("["); - colors.normal(module.id); - colors.normal("] "); - colors.bold(module.name || module.identifier); - processModuleAttributes(module); - newline(); - processModuleContent(module, " "); - }); - if(obj.filteredModules > 0) { - colors.normal(` + ${obj.filteredModules} hidden modules`); - newline(); - } - } + + processModulesList(obj, ""); if(obj._showWarnings && obj.warnings) { obj.warnings.forEach(warning => { @@ -841,53 +847,63 @@ class Stats { } static presetToOptions(name) { - //Accepted values: none, errors-only, minimal, normal, verbose - //Any other falsy value will behave as 'none', truthy values as 'normal' - const pn = (typeof name === "string") && name.toLowerCase() || name; - if(pn === "none" || !pn) { - return { - hash: false, - version: false, - timings: false, - assets: false, - entrypoints: false, - chunks: false, - chunkModules: false, - modules: false, - reasons: false, - depth: false, - usedExports: false, - providedExports: false, - optimizationBailout: false, - children: false, - source: false, - errors: false, - errorDetails: false, - warnings: false, - publicPath: false, - performance: false - }; - } else { - return { - hash: pn !== "errors-only" && pn !== "minimal", - version: pn === "verbose", - timings: pn !== "errors-only" && pn !== "minimal", - assets: pn === "verbose", - entrypoints: pn === "verbose", - chunks: pn !== "errors-only", - chunkModules: pn === "verbose", - //warnings: pn !== "errors-only", - errorDetails: pn !== "errors-only" && pn !== "minimal", - reasons: pn === "verbose", - depth: pn === "verbose", - usedExports: pn === "verbose", - providedExports: pn === "verbose", - optimizationBailout: pn === "verbose", - colors: true, - performance: true - }; + // Accepted values: none, errors-only, minimal, normal, detailed, verbose + // Any other falsy value will behave as 'none', truthy values as 'normal' + const pn = (typeof name === "string") && name.toLowerCase() || name || "none"; + switch(pn) { + case "none": + return { + all: false + }; + case "verbose": + return { + entrypoints: true, + modules: false, + chunks: true, + chunkModules: true, + chunkOrigins: true, + depth: true, + reasons: true, + usedExports: true, + providedExports: true, + optimizationBailout: true, + errorDetails: true, + publicPath: true, + exclude: () => false, + maxModules: Infinity, + }; + case "detailed": + return { + entrypoints: true, + chunks: true, + chunkModules: false, + chunkOrigins: true, + depth: true, + usedExports: true, + providedExports: true, + optimizationBailout: true, + errorDetails: true, + publicPath: true, + exclude: () => false, + maxModules: Infinity, + }; + case "minimal": + return { + all: false, + modules: true, + maxModules: 0, + errors: true, + warnings: true, + }; + case "errors-only": + return { + all: false, + errors: true, + moduleTrace: true, + }; + default: + return {}; } - } static getChildOptions(options, idx) { diff --git a/schemas/webpackOptionsSchema.json b/schemas/webpackOptionsSchema.json index b0efa1514..9e0eb215c 100644 --- a/schemas/webpackOptionsSchema.json +++ b/schemas/webpackOptionsSchema.json @@ -1035,6 +1035,7 @@ "errors-only", "minimal", "normal", + "detailed", "verbose" ] } diff --git a/test/BinTestCases.test.js b/test/BinTestCases.test.js index 7457edf10..98fff9fe0 100644 --- a/test/BinTestCases.test.js +++ b/test/BinTestCases.test.js @@ -22,7 +22,7 @@ function getTestSpecificArguments(testDirectory) { try { return loadOptsFile(path.join(testDirectory, "test.opts")); } catch(e) { - return []; + return null; } } @@ -51,7 +51,7 @@ describe("BinTestCases", function() { category.tests.forEach(function(testName) { const testDirectory = path.join(casesPath, category.name, testName); - const testArgs = defaultArgs.concat(getTestSpecificArguments(testDirectory)); + const testArgs = getTestSpecificArguments(testDirectory) || defaultArgs; const testAssertions = require(path.join(testDirectory, "test.js")); const outputPath = path.join(path.resolve(casesPath, "../js/bin"), category.name, testName); diff --git a/test/MultiStats.test.js b/test/MultiStats.test.js index c0737a0e8..211014e88 100644 --- a/test/MultiStats.test.js +++ b/test/MultiStats.test.js @@ -210,7 +210,6 @@ describe("MultiStats", () => { "(xyz890-compilation) xyz890-warning-1", "(xyz890-compilation) xyz890-warning-2" ], - hash: "abc123xyz890", children: [{ warnings: ["abc123-warning"], errors: ["abc123-error"], diff --git a/test/Stats.test.js b/test/Stats.test.js index 75e5407bf..c49ab7930 100644 --- a/test/Stats.test.js +++ b/test/Stats.test.js @@ -154,23 +154,7 @@ describe("Stats", () => { describe("Presets", () => { describe("presetToOptions", () => { it("returns correct object with 'Normal'", () => { - Stats.presetToOptions("Normal").should.eql({ - assets: false, - version: false, - timings: true, - hash: true, - entrypoints: false, - chunks: true, - chunkModules: false, - errorDetails: true, - reasons: false, - depth: false, - usedExports: false, - providedExports: false, - optimizationBailout: false, - colors: true, - performance: true - }); + Stats.presetToOptions("Normal").should.eql({}); }); it("truthy values behave as 'normal'", () => { const normalOpts = Stats.presetToOptions("normal"); @@ -183,26 +167,7 @@ describe("Stats", () => { }); it("returns correct object with 'none'", () => { Stats.presetToOptions("none").should.eql({ - hash: false, - version: false, - timings: false, - assets: false, - entrypoints: false, - chunks: false, - chunkModules: false, - modules: false, - reasons: false, - depth: false, - usedExports: false, - providedExports: false, - optimizationBailout: false, - children: false, - source: false, - errors: false, - errorDetails: false, - warnings: false, - publicPath: false, - performance: false + all: false }); }); it("falsy values behave as 'none'", () => { diff --git a/test/binCases/entry/multi-file/test.opts b/test/binCases/entry/multi-file/test.opts index 7e426fa77..53402ac53 100644 --- a/test/binCases/entry/multi-file/test.opts +++ b/test/binCases/entry/multi-file/test.opts @@ -1 +1,6 @@ +--entry ./index.js --entry ./a.js +--config ./webpack.config.js +--output-filename [name].js +--output-chunk-filename [id].chunk.js +--target async-node diff --git a/test/binCases/entry/named-entry/test.opts b/test/binCases/entry/named-entry/test.opts index fce9b8c17..b8f0fa016 100644 --- a/test/binCases/entry/named-entry/test.opts +++ b/test/binCases/entry/named-entry/test.opts @@ -1 +1,6 @@ --entry foo=./a.js +--entry ./index.js +--config ./webpack.config.js +--output-filename [name].js +--output-chunk-filename [id].chunk.js +--target async-node diff --git a/test/binCases/entry/non-hyphenated-args/test.opts b/test/binCases/entry/non-hyphenated-args/test.opts index 777a4a4b9..6b8499d52 100644 --- a/test/binCases/entry/non-hyphenated-args/test.opts +++ b/test/binCases/entry/non-hyphenated-args/test.opts @@ -1 +1,6 @@ ./a.js +--entry ./index.js +--config ./webpack.config.js +--output-filename [name].js +--output-chunk-filename [id].chunk.js +--target async-node diff --git a/test/binCases/plugins/uglifyjsplugin-empty-args/test.opts b/test/binCases/plugins/uglifyjsplugin-empty-args/test.opts index 9c67444ed..edc5ab3dc 100644 --- a/test/binCases/plugins/uglifyjsplugin-empty-args/test.opts +++ b/test/binCases/plugins/uglifyjsplugin-empty-args/test.opts @@ -1 +1,6 @@ +--entry ./index.js +--config ./webpack.config.js +--output-filename [name].js +--output-chunk-filename [id].chunk.js +--target async-node --plugin webpack/lib/optimize/UglifyJsPlugin diff --git a/test/binCases/stats/custom-preset/index.js b/test/binCases/stats/custom-preset/index.js new file mode 100644 index 000000000..e7134e700 --- /dev/null +++ b/test/binCases/stats/custom-preset/index.js @@ -0,0 +1 @@ +module.exports = "foo"; diff --git a/test/binCases/stats/custom-preset/test.js b/test/binCases/stats/custom-preset/test.js new file mode 100644 index 000000000..0b93dfe3c --- /dev/null +++ b/test/binCases/stats/custom-preset/test.js @@ -0,0 +1,8 @@ +"use strict"; + +module.exports = function testAssertions(code, stdout, stderr) { + stderr.should.be.empty(); + code.should.be.eql(0); + + stdout.should.be.empty(); +}; diff --git a/test/binCases/stats/custom-preset/test.opts b/test/binCases/stats/custom-preset/test.opts new file mode 100644 index 000000000..4747dc2f3 --- /dev/null +++ b/test/binCases/stats/custom-preset/test.opts @@ -0,0 +1,5 @@ +--entry ./index.js +--output-filename [name].js +--output-chunk-filename [id].chunk.js +--target async-node +--display none diff --git a/test/binCases/stats/none/index.js b/test/binCases/stats/none/index.js new file mode 100644 index 000000000..e7134e700 --- /dev/null +++ b/test/binCases/stats/none/index.js @@ -0,0 +1 @@ +module.exports = "foo"; diff --git a/test/binCases/stats/none/test.js b/test/binCases/stats/none/test.js new file mode 100644 index 000000000..ee38bdcc2 --- /dev/null +++ b/test/binCases/stats/none/test.js @@ -0,0 +1,8 @@ +"use strict"; + +module.exports = function testAssertions(code, stdout, stderr) { + code.should.be.eql(0); + + stdout.should.be.empty(); + stderr.should.be.empty(); +}; diff --git a/test/binCases/stats/none/webpack.config.js b/test/binCases/stats/none/webpack.config.js new file mode 100644 index 000000000..40a6ae807 --- /dev/null +++ b/test/binCases/stats/none/webpack.config.js @@ -0,0 +1,6 @@ +var path = require("path"); + +module.exports = { + entry: path.resolve(__dirname, "./index"), + stats: "none" +}; diff --git a/test/binCases/stats/single-config/test.js b/test/binCases/stats/single-config/test.js index 02dc1de94..a961bcd51 100644 --- a/test/binCases/stats/single-config/test.js +++ b/test/binCases/stats/single-config/test.js @@ -8,9 +8,10 @@ module.exports = function testAssertions(code, stdout, stderr) { stdout[1].should.containEql("Version: "); stdout[2].should.containEql("Time: "); stdout[4].should.containEql("\u001b[1m\u001b[32mnull.js\u001b[39m\u001b[22m"); - stdout[5].should.not.containEql("./index.js"); - stdout[5].should.not.containEql("[built]"); - stdout[5].should.containEql("1 hidden module"); + stdout[5].should.containEql("chunk"); + stdout[6].should.not.containEql("./index.js"); + stdout[6].should.not.containEql("[built]"); + stdout[6].should.containEql("1 module"); stderr.should.be.empty(); }; diff --git a/test/binCases/watch/multi-config-watch-opt/test.opts b/test/binCases/watch/multi-config-watch-opt/test.opts index c4b4d4f8b..38534ad57 100644 --- a/test/binCases/watch/multi-config-watch-opt/test.opts +++ b/test/binCases/watch/multi-config-watch-opt/test.opts @@ -1 +1,6 @@ +--entry ./index.js +--config ./webpack.config.js +--output-filename [name].js +--output-chunk-filename [id].chunk.js +--target async-node --watch diff --git a/test/binCases/watch/single-config-watch-opt/test.opts b/test/binCases/watch/single-config-watch-opt/test.opts index c4b4d4f8b..38534ad57 100644 --- a/test/binCases/watch/single-config-watch-opt/test.opts +++ b/test/binCases/watch/single-config-watch-opt/test.opts @@ -1 +1,6 @@ +--entry ./index.js +--config ./webpack.config.js +--output-filename [name].js +--output-chunk-filename [id].chunk.js +--target async-node --watch diff --git a/test/statsCases/aggressive-splitting-entry/webpack.config.js b/test/statsCases/aggressive-splitting-entry/webpack.config.js index 4e58f335e..4a7dbe532 100644 --- a/test/statsCases/aggressive-splitting-entry/webpack.config.js +++ b/test/statsCases/aggressive-splitting-entry/webpack.config.js @@ -16,18 +16,11 @@ module.exports = { recordsInputPath: __dirname + "/input-records.json", //recordsOutputPath: __dirname + "/records.json", stats: { - reasons: false, + chunks: true, chunkModules: true, chunkOrigins: true, entrypoints: true, modules: false, - cached: true, - cachedAssets: true, - source: true, - errorDetails: true, - publicPath: true, - excludeModules: [ - /e\.js/ - ] + publicPath: true } }; diff --git a/test/statsCases/aggressive-splitting-on-demand/webpack.config.js b/test/statsCases/aggressive-splitting-on-demand/webpack.config.js index 4e58f335e..4a7dbe532 100644 --- a/test/statsCases/aggressive-splitting-on-demand/webpack.config.js +++ b/test/statsCases/aggressive-splitting-on-demand/webpack.config.js @@ -16,18 +16,11 @@ module.exports = { recordsInputPath: __dirname + "/input-records.json", //recordsOutputPath: __dirname + "/records.json", stats: { - reasons: false, + chunks: true, chunkModules: true, chunkOrigins: true, entrypoints: true, modules: false, - cached: true, - cachedAssets: true, - source: true, - errorDetails: true, - publicPath: true, - excludeModules: [ - /e\.js/ - ] + publicPath: true } }; diff --git a/test/statsCases/chunks/expected.txt b/test/statsCases/chunks/expected.txt index c31376a9a..e1236ea15 100644 --- a/test/statsCases/chunks/expected.txt +++ b/test/statsCases/chunks/expected.txt @@ -29,21 +29,4 @@ chunk {3} bundle.js (main) 73 bytes [entry] [rendered] cjs require ./a [5] (webpack)/test/statsCases/chunks/index.js 1:0-14 [] -> factory:Xms building:Xms = Xms [5] (webpack)/test/statsCases/chunks/index.js 51 bytes {3} [built] - factory:Xms building:Xms = Xms - [0] (webpack)/test/statsCases/chunks/a.js 22 bytes {3} [built] - cjs require ./a [5] (webpack)/test/statsCases/chunks/index.js 1:0-14 - [] -> factory:Xms building:Xms = Xms - [1] (webpack)/test/statsCases/chunks/b.js 22 bytes {1} [built] - amd require ./b [5] (webpack)/test/statsCases/chunks/index.js 2:0-16 - [] -> factory:Xms building:Xms = Xms - [2] (webpack)/test/statsCases/chunks/c.js 54 bytes {0} [built] - amd require ./c [5] (webpack)/test/statsCases/chunks/index.js 3:0-16 - [] -> factory:Xms building:Xms = Xms - [3] (webpack)/test/statsCases/chunks/d.js 22 bytes {2} [built] - require.ensure item ./d [2] (webpack)/test/statsCases/chunks/c.js 1:0-52 - [] -> factory:Xms building:Xms = Xms - [4] (webpack)/test/statsCases/chunks/e.js 22 bytes {2} [built] - require.ensure item ./e [2] (webpack)/test/statsCases/chunks/c.js 1:0-52 - [] -> factory:Xms building:Xms = Xms - [5] (webpack)/test/statsCases/chunks/index.js 51 bytes {3} [built] - factory:Xms building:Xms = Xms \ No newline at end of file + factory:Xms building:Xms = Xms \ No newline at end of file diff --git a/test/statsCases/chunks/webpack.config.js b/test/statsCases/chunks/webpack.config.js index 78a5b433e..ac4b79411 100644 --- a/test/statsCases/chunks/webpack.config.js +++ b/test/statsCases/chunks/webpack.config.js @@ -6,16 +6,10 @@ module.exports = { profile: true, stats: { reasons: true, + chunks: true, chunkModules: true, chunkOrigins: true, - modules: true, - cached: true, - cachedAssets: true, - source: true, - errorDetails: true, - publicPath: true, - excludeModules: [ - /e\.js/ - ] + modules: false, + publicPath: true } }; diff --git a/test/statsCases/color-disabled/expected.txt b/test/statsCases/color-disabled/expected.txt index bfdc113eb..9e18644ea 100644 --- a/test/statsCases/color-disabled/expected.txt +++ b/test/statsCases/color-disabled/expected.txt @@ -2,5 +2,4 @@ Hash: 6c781fe6bf412ba6435b Time: Xms Asset Size Chunks Chunk Names main.js 2.47 kB 0 [emitted] main -chunk {0} main.js (main) 0 bytes [entry] [rendered] - [0] (webpack)/test/statsCases/color-disabled/index.js 0 bytes {0} [built] \ No newline at end of file + [0] (webpack)/test/statsCases/color-disabled/index.js 0 bytes {0} [built] \ No newline at end of file diff --git a/test/statsCases/color-enabled-custom/expected.txt b/test/statsCases/color-enabled-custom/expected.txt index 4ece616c4..f14fd735e 100644 --- a/test/statsCases/color-enabled-custom/expected.txt +++ b/test/statsCases/color-enabled-custom/expected.txt @@ -2,5 +2,4 @@ Hash: 6c781fe6bf412ba6435b Time: Xms Asset Size Chunks Chunk Names main.js 2.47 kB 0 [emitted] main -chunk {0} main.js (main) 0 bytes [entry] [rendered] - [0] (webpack)/test/statsCases/color-enabled-custom/index.js 0 bytes {0} [built] \ No newline at end of file + [0] (webpack)/test/statsCases/color-enabled-custom/index.js 0 bytes {0} [built] \ No newline at end of file diff --git a/test/statsCases/color-enabled/expected.txt b/test/statsCases/color-enabled/expected.txt index b835db9f1..a9ee8d254 100644 --- a/test/statsCases/color-enabled/expected.txt +++ b/test/statsCases/color-enabled/expected.txt @@ -2,5 +2,4 @@ Hash: 6c781fe6bf412ba6435b Time: Xms Asset Size Chunks Chunk Names main.js 2.47 kB 0 [emitted] main -chunk {0} main.js (main) 0 bytes [entry] [rendered] - [0] (webpack)/test/statsCases/color-enabled/index.js 0 bytes {0} [built] \ No newline at end of file + [0] (webpack)/test/statsCases/color-enabled/index.js 0 bytes {0} [built] \ No newline at end of file diff --git a/test/statsCases/commons-chunk-min-size-0/expected.txt b/test/statsCases/commons-chunk-min-size-0/expected.txt index f265ca90a..0673e9ea2 100644 --- a/test/statsCases/commons-chunk-min-size-0/expected.txt +++ b/test/statsCases/commons-chunk-min-size-0/expected.txt @@ -3,13 +3,11 @@ Time: Xms Asset Size Chunks Chunk Names entry-1.js 25 bytes 0 [emitted] entry-1 vendor-1.js 6.76 kB 1 [emitted] vendor-1 -chunk {0} entry-1.js (entry-1) 0 bytes {1} [initial] [rendered] -chunk {1} vendor-1.js (vendor-1) 329 bytes [entry] [rendered] - [0] (webpack)/test/statsCases/commons-chunk-min-size-0/modules/a.js 22 bytes {1} [built] - [1] (webpack)/test/statsCases/commons-chunk-min-size-0/modules/b.js 22 bytes {1} [built] - [2] (webpack)/test/statsCases/commons-chunk-min-size-0/modules/c.js 22 bytes {1} [built] - [3] (webpack)/test/statsCases/commons-chunk-min-size-0/modules/d.js 22 bytes {1} [built] - [4] (webpack)/test/statsCases/commons-chunk-min-size-0/modules/e.js 22 bytes {1} [built] - [5] (webpack)/test/statsCases/commons-chunk-min-size-0/modules/f.js 22 bytes {1} [built] - [6] multi ./modules/a ./modules/b ./modules/c 52 bytes {1} [built] - [7] (webpack)/test/statsCases/commons-chunk-min-size-0/entry-1.js 145 bytes {1} [built] \ No newline at end of file + [0] (webpack)/test/statsCases/commons-chunk-min-size-0/modules/a.js 22 bytes {1} [built] + [1] (webpack)/test/statsCases/commons-chunk-min-size-0/modules/b.js 22 bytes {1} [built] + [2] (webpack)/test/statsCases/commons-chunk-min-size-0/modules/c.js 22 bytes {1} [built] + [3] (webpack)/test/statsCases/commons-chunk-min-size-0/modules/d.js 22 bytes {1} [built] + [4] (webpack)/test/statsCases/commons-chunk-min-size-0/modules/e.js 22 bytes {1} [built] + [5] (webpack)/test/statsCases/commons-chunk-min-size-0/modules/f.js 22 bytes {1} [built] + [6] multi ./modules/a ./modules/b ./modules/c 52 bytes {1} [built] + [7] (webpack)/test/statsCases/commons-chunk-min-size-0/entry-1.js 145 bytes {1} [built] \ No newline at end of file diff --git a/test/statsCases/commons-chunk-min-size-Infinity/expected.txt b/test/statsCases/commons-chunk-min-size-Infinity/expected.txt index 71a9b135a..604973f76 100644 --- a/test/statsCases/commons-chunk-min-size-Infinity/expected.txt +++ b/test/statsCases/commons-chunk-min-size-Infinity/expected.txt @@ -3,16 +3,11 @@ Time: Xms Asset Size Chunks Chunk Names entry-1.js 3.11 kB 0 [emitted] entry-1 vendor-1.js 2.85 kB 1 [emitted] vendor-1 -chunk {0} entry-1.js (entry-1) 277 bytes [entry] [rendered] - [0] (webpack)/test/statsCases/commons-chunk-min-size-Infinity/modules/a.js 22 bytes {0} {1} [built] - [1] (webpack)/test/statsCases/commons-chunk-min-size-Infinity/modules/b.js 22 bytes {0} {1} [built] - [2] (webpack)/test/statsCases/commons-chunk-min-size-Infinity/modules/c.js 22 bytes {0} {1} [built] - [3] (webpack)/test/statsCases/commons-chunk-min-size-Infinity/entry-1.js 145 bytes {0} [built] - [4] (webpack)/test/statsCases/commons-chunk-min-size-Infinity/modules/d.js 22 bytes {0} [built] - [5] (webpack)/test/statsCases/commons-chunk-min-size-Infinity/modules/e.js 22 bytes {0} [built] - [6] (webpack)/test/statsCases/commons-chunk-min-size-Infinity/modules/f.js 22 bytes {0} [built] -chunk {1} vendor-1.js (vendor-1) 118 bytes [entry] [rendered] - [0] (webpack)/test/statsCases/commons-chunk-min-size-Infinity/modules/a.js 22 bytes {0} {1} [built] - [1] (webpack)/test/statsCases/commons-chunk-min-size-Infinity/modules/b.js 22 bytes {0} {1} [built] - [2] (webpack)/test/statsCases/commons-chunk-min-size-Infinity/modules/c.js 22 bytes {0} {1} [built] - [7] multi ./modules/a ./modules/b ./modules/c 52 bytes {1} [built] \ No newline at end of file + [0] (webpack)/test/statsCases/commons-chunk-min-size-Infinity/modules/a.js 22 bytes {0} {1} [built] + [1] (webpack)/test/statsCases/commons-chunk-min-size-Infinity/modules/b.js 22 bytes {0} {1} [built] + [2] (webpack)/test/statsCases/commons-chunk-min-size-Infinity/modules/c.js 22 bytes {0} {1} [built] + [3] (webpack)/test/statsCases/commons-chunk-min-size-Infinity/entry-1.js 145 bytes {0} [built] + [4] (webpack)/test/statsCases/commons-chunk-min-size-Infinity/modules/d.js 22 bytes {0} [built] + [5] (webpack)/test/statsCases/commons-chunk-min-size-Infinity/modules/e.js 22 bytes {0} [built] + [6] (webpack)/test/statsCases/commons-chunk-min-size-Infinity/modules/f.js 22 bytes {0} [built] + [7] multi ./modules/a ./modules/b ./modules/c 52 bytes {1} [built] \ No newline at end of file diff --git a/test/statsCases/define-plugin/expected.txt b/test/statsCases/define-plugin/expected.txt index 2305b3e70..bc25d5d7a 100644 --- a/test/statsCases/define-plugin/expected.txt +++ b/test/statsCases/define-plugin/expected.txt @@ -4,12 +4,10 @@ Child Time: Xms Asset Size Chunks Chunk Names main.js 2.52 kB 0 [emitted] main - chunk {0} main.js (main) 24 bytes [entry] [rendered] - [0] (webpack)/test/statsCases/define-plugin/index.js 24 bytes {0} [built] + [0] (webpack)/test/statsCases/define-plugin/index.js 24 bytes {0} [built] Child Hash: eb3ff8e5a88b9234d04f Time: Xms Asset Size Chunks Chunk Names main.js 2.52 kB 0 [emitted] main - chunk {0} main.js (main) 24 bytes [entry] [rendered] - [0] (webpack)/test/statsCases/define-plugin/index.js 24 bytes {0} [built] \ No newline at end of file + [0] (webpack)/test/statsCases/define-plugin/index.js 24 bytes {0} [built] \ No newline at end of file diff --git a/test/statsCases/exclude-with-loader/expected.txt b/test/statsCases/exclude-with-loader/expected.txt index a0562e5b1..ed85ee6da 100644 --- a/test/statsCases/exclude-with-loader/expected.txt +++ b/test/statsCases/exclude-with-loader/expected.txt @@ -2,7 +2,6 @@ Hash: 7ab067a6a9fc61623ae0 Time: Xms Asset Size Chunks Chunk Names bundle.js 2.74 kB 0 [emitted] main -chunk {0} bundle.js (main) 132 bytes [entry] [rendered] - [0] (webpack)/test/statsCases/exclude-with-loader/a.txt 43 bytes {0} [built] - [2] (webpack)/test/statsCases/exclude-with-loader/index.js 46 bytes {0} [built] - + 1 hidden modules \ No newline at end of file + [0] (webpack)/test/statsCases/exclude-with-loader/a.txt 43 bytes {0} [built] + [2] (webpack)/test/statsCases/exclude-with-loader/index.js 46 bytes {0} [built] + + 1 hidden module \ No newline at end of file diff --git a/test/statsCases/external/expected.txt b/test/statsCases/external/expected.txt index 671cbcc3e..155880576 100644 --- a/test/statsCases/external/expected.txt +++ b/test/statsCases/external/expected.txt @@ -2,6 +2,5 @@ Hash: 86950abf8dcf924d9cc1 Time: Xms Asset Size Chunks Chunk Names main.js 2.61 kB 0 [emitted] main -chunk {0} main.js (main) 59 bytes [entry] [rendered] - [0] (webpack)/test/statsCases/external/index.js 17 bytes {0} [built] - [1] external "test" 42 bytes {0} [not cacheable] \ No newline at end of file + [0] (webpack)/test/statsCases/external/index.js 17 bytes {0} [built] + [1] external "test" 42 bytes {0} [not cacheable] \ No newline at end of file diff --git a/test/statsCases/filter-warnings/expected.txt b/test/statsCases/filter-warnings/expected.txt index 0d4b13cb0..6e943c68d 100644 --- a/test/statsCases/filter-warnings/expected.txt +++ b/test/statsCases/filter-warnings/expected.txt @@ -4,7 +4,6 @@ Child Time: Xms Asset Size Chunks Chunk Names bundle.js 2.1 kB 0 [emitted] main - chunk {0} bundle.js (main) 1.04 kB [entry] [rendered] WARNING in bundle.js from UglifyJs Dropping unused function someRemoteUnUsedFunction1 [./a.js:3,0] @@ -23,43 +22,36 @@ Child Time: Xms Asset Size Chunks Chunk Names bundle.js 2.1 kB 0 [emitted] main - chunk {0} bundle.js (main) 1.04 kB [entry] [rendered] Child Hash: e4d2b189bb205589ee1e Time: Xms Asset Size Chunks Chunk Names bundle.js 2.1 kB 0 [emitted] main - chunk {0} bundle.js (main) 1.04 kB [entry] [rendered] Child Hash: e4d2b189bb205589ee1e Time: Xms Asset Size Chunks Chunk Names bundle.js 2.1 kB 0 [emitted] main - chunk {0} bundle.js (main) 1.04 kB [entry] [rendered] Child Hash: e4d2b189bb205589ee1e Time: Xms Asset Size Chunks Chunk Names bundle.js 2.1 kB 0 [emitted] main - chunk {0} bundle.js (main) 1.04 kB [entry] [rendered] Child Hash: e4d2b189bb205589ee1e Time: Xms Asset Size Chunks Chunk Names bundle.js 2.1 kB 0 [emitted] main - chunk {0} bundle.js (main) 1.04 kB [entry] [rendered] Child Hash: e4d2b189bb205589ee1e Time: Xms Asset Size Chunks Chunk Names bundle.js 2.1 kB 0 [emitted] main - chunk {0} bundle.js (main) 1.04 kB [entry] [rendered] Child Hash: e4d2b189bb205589ee1e Time: Xms Asset Size Chunks Chunk Names bundle.js 2.1 kB 0 [emitted] main - chunk {0} bundle.js (main) 1.04 kB [entry] [rendered] WARNING in bundle.js from UglifyJs Dropping unused function someRemoteUnUsedFunction1 [./a.js:3,0] @@ -78,7 +70,6 @@ Child Time: Xms Asset Size Chunks Chunk Names bundle.js 2.1 kB 0 [emitted] main - chunk {0} bundle.js (main) 1.04 kB [entry] [rendered] WARNING in bundle.js from UglifyJs Dropping unused function someRemoteUnUsedFunction1 [./a.js:3,0] @@ -97,7 +88,6 @@ Child Time: Xms Asset Size Chunks Chunk Names bundle.js 2.1 kB 0 [emitted] main - chunk {0} bundle.js (main) 1.04 kB [entry] [rendered] WARNING in bundle.js from UglifyJs Dropping unused function someRemoteUnUsedFunction1 [./a.js:3,0] @@ -116,7 +106,6 @@ Child Time: Xms Asset Size Chunks Chunk Names bundle.js 2.1 kB 0 [emitted] main - chunk {0} bundle.js (main) 1.04 kB [entry] [rendered] WARNING in bundle.js from UglifyJs Dropping unused function someRemoteUnUsedFunction1 [./a.js:3,0] @@ -135,7 +124,6 @@ Child Time: Xms Asset Size Chunks Chunk Names bundle.js 2.1 kB 0 [emitted] main - chunk {0} bundle.js (main) 1.04 kB [entry] [rendered] WARNING in bundle.js from UglifyJs Dropping unused function someRemoteUnUsedFunction1 [./a.js:3,0] @@ -154,7 +142,6 @@ Child Time: Xms Asset Size Chunks Chunk Names bundle.js 2.1 kB 0 [emitted] main - chunk {0} bundle.js (main) 1.04 kB [entry] [rendered] WARNING in bundle.js from UglifyJs Dropping unused function someRemoteUnUsedFunction1 [./a.js:3,0] diff --git a/test/statsCases/max-modules-default/expected.txt b/test/statsCases/max-modules-default/expected.txt index 28d7d6790..5a1edc02a 100644 --- a/test/statsCases/max-modules-default/expected.txt +++ b/test/statsCases/max-modules-default/expected.txt @@ -2,20 +2,19 @@ Hash: 8f4b66734cb63e0581be Time: Xms Asset Size Chunks Chunk Names main.js 5.79 kB 0 [emitted] main -chunk {0} main.js (main) 1.18 kB [entry] [rendered] - [0] (webpack)/test/statsCases/max-modules-default/a.js?1 33 bytes {0} [built] - [1] (webpack)/test/statsCases/max-modules-default/a.js?10 33 bytes {0} [built] - [2] (webpack)/test/statsCases/max-modules-default/a.js?2 33 bytes {0} [built] - [3] (webpack)/test/statsCases/max-modules-default/a.js?3 33 bytes {0} [built] - [4] (webpack)/test/statsCases/max-modules-default/a.js?4 33 bytes {0} [built] - [5] (webpack)/test/statsCases/max-modules-default/a.js?5 33 bytes {0} [built] - [6] (webpack)/test/statsCases/max-modules-default/a.js?6 33 bytes {0} [built] - [7] (webpack)/test/statsCases/max-modules-default/a.js?7 33 bytes {0} [built] - [8] (webpack)/test/statsCases/max-modules-default/a.js?8 33 bytes {0} [built] - [9] (webpack)/test/statsCases/max-modules-default/a.js?9 33 bytes {0} [built] - [20] (webpack)/test/statsCases/max-modules-default/c.js?1 33 bytes {0} [built] - [21] (webpack)/test/statsCases/max-modules-default/c.js?10 33 bytes {0} [built] - [22] (webpack)/test/statsCases/max-modules-default/c.js?2 33 bytes {0} [built] - [23] (webpack)/test/statsCases/max-modules-default/c.js?3 33 bytes {0} [built] - [30] (webpack)/test/statsCases/max-modules-default/index.js 181 bytes {0} [built] - + 16 hidden modules \ No newline at end of file + [0] (webpack)/test/statsCases/max-modules-default/a.js?1 33 bytes {0} [built] + [1] (webpack)/test/statsCases/max-modules-default/a.js?10 33 bytes {0} [built] + [2] (webpack)/test/statsCases/max-modules-default/a.js?2 33 bytes {0} [built] + [3] (webpack)/test/statsCases/max-modules-default/a.js?3 33 bytes {0} [built] + [4] (webpack)/test/statsCases/max-modules-default/a.js?4 33 bytes {0} [built] + [5] (webpack)/test/statsCases/max-modules-default/a.js?5 33 bytes {0} [built] + [6] (webpack)/test/statsCases/max-modules-default/a.js?6 33 bytes {0} [built] + [7] (webpack)/test/statsCases/max-modules-default/a.js?7 33 bytes {0} [built] + [8] (webpack)/test/statsCases/max-modules-default/a.js?8 33 bytes {0} [built] + [9] (webpack)/test/statsCases/max-modules-default/a.js?9 33 bytes {0} [built] + [20] (webpack)/test/statsCases/max-modules-default/c.js?1 33 bytes {0} [built] + [21] (webpack)/test/statsCases/max-modules-default/c.js?10 33 bytes {0} [built] + [22] (webpack)/test/statsCases/max-modules-default/c.js?2 33 bytes {0} [built] + [23] (webpack)/test/statsCases/max-modules-default/c.js?3 33 bytes {0} [built] + [30] (webpack)/test/statsCases/max-modules-default/index.js 181 bytes {0} [built] + + 16 hidden modules \ No newline at end of file diff --git a/test/statsCases/max-modules/expected.txt b/test/statsCases/max-modules/expected.txt index c8d3f2d2a..f3e1e8d17 100644 --- a/test/statsCases/max-modules/expected.txt +++ b/test/statsCases/max-modules/expected.txt @@ -2,25 +2,24 @@ Hash: 8f4b66734cb63e0581be Time: Xms Asset Size Chunks Chunk Names main.js 5.79 kB 0 [emitted] main -chunk {0} main.js (main) 1.18 kB [entry] [rendered] - [0] (webpack)/test/statsCases/max-modules/a.js?1 33 bytes {0} [built] - [1] (webpack)/test/statsCases/max-modules/a.js?10 33 bytes {0} [built] - [2] (webpack)/test/statsCases/max-modules/a.js?2 33 bytes {0} [built] - [3] (webpack)/test/statsCases/max-modules/a.js?3 33 bytes {0} [built] - [4] (webpack)/test/statsCases/max-modules/a.js?4 33 bytes {0} [built] - [5] (webpack)/test/statsCases/max-modules/a.js?5 33 bytes {0} [built] - [6] (webpack)/test/statsCases/max-modules/a.js?6 33 bytes {0} [built] - [7] (webpack)/test/statsCases/max-modules/a.js?7 33 bytes {0} [built] - [8] (webpack)/test/statsCases/max-modules/a.js?8 33 bytes {0} [built] - [9] (webpack)/test/statsCases/max-modules/a.js?9 33 bytes {0} [built] - [20] (webpack)/test/statsCases/max-modules/c.js?1 33 bytes {0} [built] - [21] (webpack)/test/statsCases/max-modules/c.js?10 33 bytes {0} [built] - [22] (webpack)/test/statsCases/max-modules/c.js?2 33 bytes {0} [built] - [23] (webpack)/test/statsCases/max-modules/c.js?3 33 bytes {0} [built] - [24] (webpack)/test/statsCases/max-modules/c.js?4 33 bytes {0} [built] - [25] (webpack)/test/statsCases/max-modules/c.js?5 33 bytes {0} [built] - [26] (webpack)/test/statsCases/max-modules/c.js?6 33 bytes {0} [built] - [27] (webpack)/test/statsCases/max-modules/c.js?7 33 bytes {0} [built] - [28] (webpack)/test/statsCases/max-modules/c.js?8 33 bytes {0} [built] - [30] (webpack)/test/statsCases/max-modules/index.js 181 bytes {0} [built] - + 11 hidden modules \ No newline at end of file + [0] (webpack)/test/statsCases/max-modules/a.js?1 33 bytes {0} [built] + [1] (webpack)/test/statsCases/max-modules/a.js?10 33 bytes {0} [built] + [2] (webpack)/test/statsCases/max-modules/a.js?2 33 bytes {0} [built] + [3] (webpack)/test/statsCases/max-modules/a.js?3 33 bytes {0} [built] + [4] (webpack)/test/statsCases/max-modules/a.js?4 33 bytes {0} [built] + [5] (webpack)/test/statsCases/max-modules/a.js?5 33 bytes {0} [built] + [6] (webpack)/test/statsCases/max-modules/a.js?6 33 bytes {0} [built] + [7] (webpack)/test/statsCases/max-modules/a.js?7 33 bytes {0} [built] + [8] (webpack)/test/statsCases/max-modules/a.js?8 33 bytes {0} [built] + [9] (webpack)/test/statsCases/max-modules/a.js?9 33 bytes {0} [built] + [20] (webpack)/test/statsCases/max-modules/c.js?1 33 bytes {0} [built] + [21] (webpack)/test/statsCases/max-modules/c.js?10 33 bytes {0} [built] + [22] (webpack)/test/statsCases/max-modules/c.js?2 33 bytes {0} [built] + [23] (webpack)/test/statsCases/max-modules/c.js?3 33 bytes {0} [built] + [24] (webpack)/test/statsCases/max-modules/c.js?4 33 bytes {0} [built] + [25] (webpack)/test/statsCases/max-modules/c.js?5 33 bytes {0} [built] + [26] (webpack)/test/statsCases/max-modules/c.js?6 33 bytes {0} [built] + [27] (webpack)/test/statsCases/max-modules/c.js?7 33 bytes {0} [built] + [28] (webpack)/test/statsCases/max-modules/c.js?8 33 bytes {0} [built] + [30] (webpack)/test/statsCases/max-modules/index.js 181 bytes {0} [built] + + 11 hidden modules \ No newline at end of file diff --git a/test/statsCases/module-trace-disabled-in-error/expected.txt b/test/statsCases/module-trace-disabled-in-error/expected.txt index 1f9b72f65..4a1cecf00 100644 --- a/test/statsCases/module-trace-disabled-in-error/expected.txt +++ b/test/statsCases/module-trace-disabled-in-error/expected.txt @@ -2,8 +2,7 @@ Hash: 6e950f2e83663cb6e9a6 Time: Xms Asset Size Chunks Chunk Names main.js 2.65 kB 0 [emitted] main -chunk {0} main.js (main) 25 bytes [entry] [rendered] - [0] (webpack)/test/statsCases/module-trace-disabled-in-error/index.js 25 bytes {0} [built] + [0] (webpack)/test/statsCases/module-trace-disabled-in-error/index.js 25 bytes {0} [built] ERROR in (webpack)/test/statsCases/module-trace-disabled-in-error/index.js Module not found: Error: Can't resolve 'does-not-exist' in 'Xdir/module-trace-disabled-in-error' \ No newline at end of file diff --git a/test/statsCases/module-trace-enabled-in-error/expected.txt b/test/statsCases/module-trace-enabled-in-error/expected.txt index e5ad8c65a..f5b134c2e 100644 --- a/test/statsCases/module-trace-enabled-in-error/expected.txt +++ b/test/statsCases/module-trace-enabled-in-error/expected.txt @@ -2,8 +2,7 @@ Hash: 6e950f2e83663cb6e9a6 Time: Xms Asset Size Chunks Chunk Names main.js 2.65 kB 0 [emitted] main -chunk {0} main.js (main) 25 bytes [entry] [rendered] - [0] (webpack)/test/statsCases/module-trace-enabled-in-error/index.js 25 bytes {0} [built] + [0] (webpack)/test/statsCases/module-trace-enabled-in-error/index.js 25 bytes {0} [built] ERROR in (webpack)/test/statsCases/module-trace-enabled-in-error/index.js Module not found: Error: Can't resolve 'does-not-exist' in 'Xdir/module-trace-enabled-in-error' diff --git a/test/statsCases/named-chunks-plugin-async/expected.txt b/test/statsCases/named-chunks-plugin-async/expected.txt index 16ad228b5..809ff0492 100644 --- a/test/statsCases/named-chunks-plugin-async/expected.txt +++ b/test/statsCases/named-chunks-plugin-async/expected.txt @@ -4,9 +4,6 @@ Time: Xms chunk-containing-__a_js.js 266 bytes chunk-containing-__a_js [emitted] chunk-containing-__b_js.js 123 bytes chunk-containing-__b_js [emitted] entry.js 5.99 kB entry [emitted] entry -chunk {chunk-containing-__a_js} chunk-containing-__a_js.js 37 bytes {entry} [rendered] - [2] (webpack)/test/statsCases/named-chunks-plugin-async/modules/a.js 37 bytes {chunk-containing-__a_js} [built] -chunk {chunk-containing-__b_js} chunk-containing-__b_js.js 22 bytes {chunk-containing-__a_js} {entry} [rendered] - [0] (webpack)/test/statsCases/named-chunks-plugin-async/modules/b.js 22 bytes {chunk-containing-__b_js} [built] -chunk {entry} entry.js (entry) 47 bytes [entry] [rendered] - [1] (webpack)/test/statsCases/named-chunks-plugin-async/entry.js 47 bytes {entry} [built] \ No newline at end of file + [0] (webpack)/test/statsCases/named-chunks-plugin-async/modules/b.js 22 bytes {chunk-containing-__b_js} [built] + [1] (webpack)/test/statsCases/named-chunks-plugin-async/entry.js 47 bytes {entry} [built] + [2] (webpack)/test/statsCases/named-chunks-plugin-async/modules/a.js 37 bytes {chunk-containing-__a_js} [built] \ No newline at end of file diff --git a/test/statsCases/named-chunks-plugin/expected.txt b/test/statsCases/named-chunks-plugin/expected.txt index 503a569d9..e19f2054f 100644 --- a/test/statsCases/named-chunks-plugin/expected.txt +++ b/test/statsCases/named-chunks-plugin/expected.txt @@ -4,11 +4,8 @@ Time: Xms entry.js 345 bytes entry [emitted] entry manifest.js 5.78 kB manifest [emitted] manifest vendor.js 397 bytes vendor [emitted] vendor -chunk {entry} entry.js (entry) 94 bytes {vendor} [initial] [rendered] - [./entry.js] (webpack)/test/statsCases/named-chunks-plugin/entry.js 72 bytes {entry} [built] - [./modules/c.js] (webpack)/test/statsCases/named-chunks-plugin/modules/c.js 22 bytes {entry} [built] -chunk {manifest} manifest.js (manifest) 0 bytes [entry] [rendered] -chunk {vendor} vendor.js (vendor) 84 bytes {manifest} [initial] [rendered] - [./modules/a.js] (webpack)/test/statsCases/named-chunks-plugin/modules/a.js 22 bytes {vendor} [built] - [./modules/b.js] (webpack)/test/statsCases/named-chunks-plugin/modules/b.js 22 bytes {vendor} [built] - [0] multi ./modules/a ./modules/b 40 bytes {vendor} [built] \ No newline at end of file + [0] multi ./modules/a ./modules/b 40 bytes {vendor} [built] +[./entry.js] (webpack)/test/statsCases/named-chunks-plugin/entry.js 72 bytes {entry} [built] +[./modules/a.js] (webpack)/test/statsCases/named-chunks-plugin/modules/a.js 22 bytes {vendor} [built] +[./modules/b.js] (webpack)/test/statsCases/named-chunks-plugin/modules/b.js 22 bytes {vendor} [built] +[./modules/c.js] (webpack)/test/statsCases/named-chunks-plugin/modules/c.js 22 bytes {entry} [built] \ No newline at end of file diff --git a/test/statsCases/optimize-chunks/webpack.config.js b/test/statsCases/optimize-chunks/webpack.config.js index aaf6056a2..1af7de230 100644 --- a/test/statsCases/optimize-chunks/webpack.config.js +++ b/test/statsCases/optimize-chunks/webpack.config.js @@ -2,6 +2,9 @@ module.exports = { entry: "./index", stats: { reasons: false, + modules: false, + chunks: true, + chunkModules: true, chunkOrigins: true } }; diff --git a/test/statsCases/performance-disabled/expected.txt b/test/statsCases/performance-disabled/expected.txt index fd629bff5..fa88a9465 100644 --- a/test/statsCases/performance-disabled/expected.txt +++ b/test/statsCases/performance-disabled/expected.txt @@ -5,13 +5,9 @@ Time: Xms 2.js 204 bytes 2 [emitted] main.js 306 kB 3 [emitted] main Entrypoint main = main.js -chunk {0} 0.js 54 bytes {3} [rendered] - [2] (webpack)/test/statsCases/performance-disabled/c.js 54 bytes {0} [built] -chunk {1} 1.js 22 bytes {3} [rendered] - [1] (webpack)/test/statsCases/performance-disabled/b.js 22 bytes {1} [built] -chunk {2} 2.js 44 bytes {0} [rendered] - [3] (webpack)/test/statsCases/performance-disabled/d.js 22 bytes {2} [built] - [4] (webpack)/test/statsCases/performance-disabled/e.js 22 bytes {2} [built] -chunk {3} main.js (main) 300 kB [entry] [rendered] - [0] (webpack)/test/statsCases/performance-disabled/a.js 300 kB {3} [built] - [5] (webpack)/test/statsCases/performance-disabled/index.js 52 bytes {3} [built] \ No newline at end of file + [0] (webpack)/test/statsCases/performance-disabled/a.js 300 kB {3} [built] + [1] (webpack)/test/statsCases/performance-disabled/b.js 22 bytes {1} [built] + [2] (webpack)/test/statsCases/performance-disabled/c.js 54 bytes {0} [built] + [3] (webpack)/test/statsCases/performance-disabled/d.js 22 bytes {2} [built] + [4] (webpack)/test/statsCases/performance-disabled/e.js 22 bytes {2} [built] + [5] (webpack)/test/statsCases/performance-disabled/index.js 52 bytes {3} [built] \ No newline at end of file diff --git a/test/statsCases/performance-error/expected.txt b/test/statsCases/performance-error/expected.txt index 35daf3e17..fbb37c5d0 100644 --- a/test/statsCases/performance-error/expected.txt +++ b/test/statsCases/performance-error/expected.txt @@ -5,16 +5,12 @@ Time: Xms 2.js 204 bytes 2 [emitted] main.js 306 kB 3 [emitted] [big] main Entrypoint main [big] = main.js -chunk {0} 0.js 54 bytes {3} [rendered] - [2] (webpack)/test/statsCases/performance-error/c.js 54 bytes {0} [built] -chunk {1} 1.js 22 bytes {3} [rendered] - [1] (webpack)/test/statsCases/performance-error/b.js 22 bytes {1} [built] -chunk {2} 2.js 44 bytes {0} [rendered] - [3] (webpack)/test/statsCases/performance-error/d.js 22 bytes {2} [built] - [4] (webpack)/test/statsCases/performance-error/e.js 22 bytes {2} [built] -chunk {3} main.js (main) 300 kB [entry] [rendered] - [0] (webpack)/test/statsCases/performance-error/a.js 300 kB {3} [built] - [5] (webpack)/test/statsCases/performance-error/index.js 52 bytes {3} [built] + [0] (webpack)/test/statsCases/performance-error/a.js 300 kB {3} [built] + [1] (webpack)/test/statsCases/performance-error/b.js 22 bytes {1} [built] + [2] (webpack)/test/statsCases/performance-error/c.js 54 bytes {0} [built] + [3] (webpack)/test/statsCases/performance-error/d.js 22 bytes {2} [built] + [4] (webpack)/test/statsCases/performance-error/e.js 22 bytes {2} [built] + [5] (webpack)/test/statsCases/performance-error/index.js 52 bytes {3} [built] ERROR in asset size limit: The following asset(s) exceed the recommended size limit (250 kB). This can impact web performance. diff --git a/test/statsCases/performance-no-async-chunks-shown/expected.txt b/test/statsCases/performance-no-async-chunks-shown/expected.txt index ed7cf6e5c..637c33610 100644 --- a/test/statsCases/performance-no-async-chunks-shown/expected.txt +++ b/test/statsCases/performance-no-async-chunks-shown/expected.txt @@ -4,15 +4,12 @@ Time: Xms main.js 303 kB 1 [emitted] [big] main Entrypoint main [big] = main.js Entrypoint sec = sec.js -chunk {0} sec.js (sec) 114 bytes [entry] [rendered] - [0] (webpack)/test/statsCases/performance-no-async-chunks-shown/b.js 22 bytes {0} {1} [built] - [2] (webpack)/test/statsCases/performance-no-async-chunks-shown/c.js 22 bytes {0} [built] - [3] (webpack)/test/statsCases/performance-no-async-chunks-shown/d.js 22 bytes {0} [built] - [5] (webpack)/test/statsCases/performance-no-async-chunks-shown/index2.js 48 bytes {0} [built] -chunk {1} main.js (main) 300 kB [entry] [rendered] - [0] (webpack)/test/statsCases/performance-no-async-chunks-shown/b.js 22 bytes {0} {1} [built] - [1] (webpack)/test/statsCases/performance-no-async-chunks-shown/a.js 300 kB {1} [built] - [4] (webpack)/test/statsCases/performance-no-async-chunks-shown/index.js 32 bytes {1} [built] + [0] (webpack)/test/statsCases/performance-no-async-chunks-shown/b.js 22 bytes {0} {1} [built] + [1] (webpack)/test/statsCases/performance-no-async-chunks-shown/a.js 300 kB {1} [built] + [2] (webpack)/test/statsCases/performance-no-async-chunks-shown/c.js 22 bytes {0} [built] + [3] (webpack)/test/statsCases/performance-no-async-chunks-shown/d.js 22 bytes {0} [built] + [4] (webpack)/test/statsCases/performance-no-async-chunks-shown/index.js 32 bytes {1} [built] + [5] (webpack)/test/statsCases/performance-no-async-chunks-shown/index2.js 48 bytes {0} [built] WARNING in asset size limit: The following asset(s) exceed the recommended size limit (250 kB). This can impact web performance. diff --git a/test/statsCases/performance-no-hints/expected.txt b/test/statsCases/performance-no-hints/expected.txt index 1fd21e405..040e1cf16 100644 --- a/test/statsCases/performance-no-hints/expected.txt +++ b/test/statsCases/performance-no-hints/expected.txt @@ -5,13 +5,9 @@ Time: Xms 2.js 204 bytes 2 [emitted] main.js 306 kB 3 [emitted] [big] main Entrypoint main [big] = main.js -chunk {0} 0.js 54 bytes {3} [rendered] - [2] (webpack)/test/statsCases/performance-no-hints/c.js 54 bytes {0} [built] -chunk {1} 1.js 22 bytes {3} [rendered] - [1] (webpack)/test/statsCases/performance-no-hints/b.js 22 bytes {1} [built] -chunk {2} 2.js 44 bytes {0} [rendered] - [3] (webpack)/test/statsCases/performance-no-hints/d.js 22 bytes {2} [built] - [4] (webpack)/test/statsCases/performance-no-hints/e.js 22 bytes {2} [built] -chunk {3} main.js (main) 300 kB [entry] [rendered] - [0] (webpack)/test/statsCases/performance-no-hints/a.js 300 kB {3} [built] - [5] (webpack)/test/statsCases/performance-no-hints/index.js 52 bytes {3} [built] \ No newline at end of file + [0] (webpack)/test/statsCases/performance-no-hints/a.js 300 kB {3} [built] + [1] (webpack)/test/statsCases/performance-no-hints/b.js 22 bytes {1} [built] + [2] (webpack)/test/statsCases/performance-no-hints/c.js 54 bytes {0} [built] + [3] (webpack)/test/statsCases/performance-no-hints/d.js 22 bytes {2} [built] + [4] (webpack)/test/statsCases/performance-no-hints/e.js 22 bytes {2} [built] + [5] (webpack)/test/statsCases/performance-no-hints/index.js 52 bytes {3} [built] \ No newline at end of file diff --git a/test/statsCases/performance-oversize-limit-error/expected.txt b/test/statsCases/performance-oversize-limit-error/expected.txt index 92f30846f..200eedb07 100644 --- a/test/statsCases/performance-oversize-limit-error/expected.txt +++ b/test/statsCases/performance-oversize-limit-error/expected.txt @@ -4,12 +4,9 @@ Time: Xms main.js 303 kB 1 [emitted] [big] main Entrypoint main [big] = main.js Entrypoint sec [big] = sec.js -chunk {0} sec.js (sec) 300 kB [entry] [rendered] - [0] (webpack)/test/statsCases/performance-oversize-limit-error/a.js 300 kB {0} {1} [built] - [2] (webpack)/test/statsCases/performance-oversize-limit-error/index2.js 16 bytes {0} [built] -chunk {1} main.js (main) 300 kB [entry] [rendered] - [0] (webpack)/test/statsCases/performance-oversize-limit-error/a.js 300 kB {0} {1} [built] - [1] (webpack)/test/statsCases/performance-oversize-limit-error/index.js 16 bytes {1} [built] + [0] (webpack)/test/statsCases/performance-oversize-limit-error/a.js 300 kB {0} {1} [built] + [1] (webpack)/test/statsCases/performance-oversize-limit-error/index.js 16 bytes {1} [built] + [2] (webpack)/test/statsCases/performance-oversize-limit-error/index2.js 16 bytes {0} [built] ERROR in asset size limit: The following asset(s) exceed the recommended size limit (250 kB). This can impact web performance. diff --git a/test/statsCases/preset-detailed/a.js b/test/statsCases/preset-detailed/a.js new file mode 100644 index 000000000..6cd1d0075 --- /dev/null +++ b/test/statsCases/preset-detailed/a.js @@ -0,0 +1 @@ +module.exports = "a"; diff --git a/test/statsCases/preset-detailed/b.js b/test/statsCases/preset-detailed/b.js new file mode 100644 index 000000000..dfbbeb621 --- /dev/null +++ b/test/statsCases/preset-detailed/b.js @@ -0,0 +1 @@ +module.exports = "b"; diff --git a/test/statsCases/preset-detailed/c.js b/test/statsCases/preset-detailed/c.js new file mode 100644 index 000000000..84bdba76f --- /dev/null +++ b/test/statsCases/preset-detailed/c.js @@ -0,0 +1 @@ +require.ensure(["./d", "./e"], function(require) {}); diff --git a/test/statsCases/preset-detailed/d.js b/test/statsCases/preset-detailed/d.js new file mode 100644 index 000000000..0a281018c --- /dev/null +++ b/test/statsCases/preset-detailed/d.js @@ -0,0 +1 @@ +module.exports = "d"; diff --git a/test/statsCases/preset-detailed/e.js b/test/statsCases/preset-detailed/e.js new file mode 100644 index 000000000..7884d62f7 --- /dev/null +++ b/test/statsCases/preset-detailed/e.js @@ -0,0 +1 @@ +module.exports = "e"; diff --git a/test/statsCases/preset-detailed/expected.txt b/test/statsCases/preset-detailed/expected.txt new file mode 100644 index 000000000..e92c607c7 --- /dev/null +++ b/test/statsCases/preset-detailed/expected.txt @@ -0,0 +1,22 @@ +Hash: c5a6856b43905ae12f17 +Time: Xms + Asset Size Chunks Chunk Names + 0.js 238 bytes 0 [emitted] + 1.js 108 bytes 1 [emitted] + 2.js 204 bytes 2 [emitted] +main.js 6.1 kB 3 [emitted] main +Entrypoint main = main.js +chunk {0} 0.js 54 bytes {3} [rendered] + > [5] (webpack)/test/statsCases/preset-detailed/index.js 3:0-16 +chunk {1} 1.js 22 bytes {3} [rendered] + > [5] (webpack)/test/statsCases/preset-detailed/index.js 2:0-16 +chunk {2} 2.js 44 bytes {0} [rendered] + > [2] (webpack)/test/statsCases/preset-detailed/c.js 1:0-52 +chunk {3} main.js (main) 73 bytes [entry] [rendered] + > main [5] (webpack)/test/statsCases/preset-detailed/index.js + [0] (webpack)/test/statsCases/preset-detailed/a.js 22 bytes {3} [depth 1] [built] + [1] (webpack)/test/statsCases/preset-detailed/b.js 22 bytes {1} [depth 1] [built] + [2] (webpack)/test/statsCases/preset-detailed/c.js 54 bytes {0} [depth 1] [built] + [3] (webpack)/test/statsCases/preset-detailed/d.js 22 bytes {2} [depth 2] [built] + [4] (webpack)/test/statsCases/preset-detailed/e.js 22 bytes {2} [depth 2] [built] + [5] (webpack)/test/statsCases/preset-detailed/index.js 51 bytes {3} [depth 0] [built] \ No newline at end of file diff --git a/test/statsCases/preset-detailed/index.js b/test/statsCases/preset-detailed/index.js new file mode 100644 index 000000000..86b979b0d --- /dev/null +++ b/test/statsCases/preset-detailed/index.js @@ -0,0 +1,3 @@ +require("./a"); +require(["./b"]); +require(["./c"]); \ No newline at end of file diff --git a/test/statsCases/preset-detailed/webpack.config.js b/test/statsCases/preset-detailed/webpack.config.js new file mode 100644 index 000000000..0557c0405 --- /dev/null +++ b/test/statsCases/preset-detailed/webpack.config.js @@ -0,0 +1,4 @@ +module.exports = { + entry: "./index", + stats: "detailed" +}; diff --git a/test/statsCases/preset-minimal-simple/expected.txt b/test/statsCases/preset-minimal-simple/expected.txt index 21bb031a2..2ba6dec13 100644 --- a/test/statsCases/preset-minimal-simple/expected.txt +++ b/test/statsCases/preset-minimal-simple/expected.txt @@ -1 +1 @@ -chunk {0} main.js (main) 0 bytes [entry] [rendered] \ No newline at end of file + 1 module \ No newline at end of file diff --git a/test/statsCases/preset-minimal/expected.txt b/test/statsCases/preset-minimal/expected.txt index b5228183e..fb8d2244f 100644 --- a/test/statsCases/preset-minimal/expected.txt +++ b/test/statsCases/preset-minimal/expected.txt @@ -1,4 +1 @@ -chunk {0} 0.js 54 bytes {3} [rendered] -chunk {1} 1.js 22 bytes {3} [rendered] -chunk {2} 2.js 44 bytes {0} [rendered] -chunk {3} main.js (main) 73 bytes [entry] [rendered] \ No newline at end of file + 6 modules \ No newline at end of file diff --git a/test/statsCases/preset-mixed-array/expected.txt b/test/statsCases/preset-mixed-array/expected.txt index 3665b12d1..e355ec4b6 100644 --- a/test/statsCases/preset-mixed-array/expected.txt +++ b/test/statsCases/preset-mixed-array/expected.txt @@ -1,4 +1,5 @@ Child minimal: - chunk {0} main.js (main) 8 bytes [entry] [rendered] + 1 module Child verbose: - Entrypoint main = main.js \ No newline at end of file + Entrypoint main = main.js + [0] (webpack)/test/statsCases/preset-mixed-array/index.js 8 bytes {0} [built] \ No newline at end of file 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 3ccf98a42..a25857c2c 100644 --- a/test/statsCases/preset-normal-performance-ensure-filter-sourcemaps/expected.txt +++ b/test/statsCases/preset-normal-performance-ensure-filter-sourcemaps/expected.txt @@ -8,16 +8,12 @@ Time: Xms 1.js.map 250 bytes 1 [emitted] 2.js.map 405 bytes 2 [emitted] main.js.map 1.81 MB 3 [emitted] main -chunk {0} 0.js, 0.js.map 54 bytes {3} [rendered] - [2] (webpack)/test/statsCases/preset-normal-performance-ensure-filter-sourcemaps/c.js 54 bytes {0} [built] -chunk {1} 1.js, 1.js.map 22 bytes {3} [rendered] - [1] (webpack)/test/statsCases/preset-normal-performance-ensure-filter-sourcemaps/b.js 22 bytes {1} [built] -chunk {2} 2.js, 2.js.map 44 bytes {0} [rendered] - [3] (webpack)/test/statsCases/preset-normal-performance-ensure-filter-sourcemaps/d.js 22 bytes {2} [built] - [4] (webpack)/test/statsCases/preset-normal-performance-ensure-filter-sourcemaps/e.js 22 bytes {2} [built] -chunk {3} main.js, main.js.map (main) 300 kB [entry] [rendered] - [0] (webpack)/test/statsCases/preset-normal-performance-ensure-filter-sourcemaps/a.js 300 kB {3} [built] - [5] (webpack)/test/statsCases/preset-normal-performance-ensure-filter-sourcemaps/index.js 52 bytes {3} [built] + [0] (webpack)/test/statsCases/preset-normal-performance-ensure-filter-sourcemaps/a.js 300 kB {3} [built] + [1] (webpack)/test/statsCases/preset-normal-performance-ensure-filter-sourcemaps/b.js 22 bytes {1} [built] + [2] (webpack)/test/statsCases/preset-normal-performance-ensure-filter-sourcemaps/c.js 54 bytes {0} [built] + [3] (webpack)/test/statsCases/preset-normal-performance-ensure-filter-sourcemaps/d.js 22 bytes {2} [built] + [4] (webpack)/test/statsCases/preset-normal-performance-ensure-filter-sourcemaps/e.js 22 bytes {2} [built] + [5] (webpack)/test/statsCases/preset-normal-performance-ensure-filter-sourcemaps/index.js 52 bytes {3} [built] WARNING in asset size limit: The following asset(s) exceed the recommended size limit (250 kB). This can impact web performance. diff --git a/test/statsCases/preset-normal-performance/expected.txt b/test/statsCases/preset-normal-performance/expected.txt index 044000957..73861de5a 100644 --- a/test/statsCases/preset-normal-performance/expected.txt +++ b/test/statsCases/preset-normal-performance/expected.txt @@ -4,16 +4,12 @@ Time: Xms 1.js 108 bytes 1 [emitted] 2.js 204 bytes 2 [emitted] main.js 306 kB 3 [emitted] [big] main -chunk {0} 0.js 54 bytes {3} [rendered] - [2] (webpack)/test/statsCases/preset-normal-performance/c.js 54 bytes {0} [built] -chunk {1} 1.js 22 bytes {3} [rendered] - [1] (webpack)/test/statsCases/preset-normal-performance/b.js 22 bytes {1} [built] -chunk {2} 2.js 44 bytes {0} [rendered] - [3] (webpack)/test/statsCases/preset-normal-performance/d.js 22 bytes {2} [built] - [4] (webpack)/test/statsCases/preset-normal-performance/e.js 22 bytes {2} [built] -chunk {3} main.js (main) 300 kB [entry] [rendered] - [0] (webpack)/test/statsCases/preset-normal-performance/a.js 300 kB {3} [built] - [5] (webpack)/test/statsCases/preset-normal-performance/index.js 52 bytes {3} [built] + [0] (webpack)/test/statsCases/preset-normal-performance/a.js 300 kB {3} [built] + [1] (webpack)/test/statsCases/preset-normal-performance/b.js 22 bytes {1} [built] + [2] (webpack)/test/statsCases/preset-normal-performance/c.js 54 bytes {0} [built] + [3] (webpack)/test/statsCases/preset-normal-performance/d.js 22 bytes {2} [built] + [4] (webpack)/test/statsCases/preset-normal-performance/e.js 22 bytes {2} [built] + [5] (webpack)/test/statsCases/preset-normal-performance/index.js 52 bytes {3} [built] WARNING in asset size limit: The following asset(s) exceed the recommended size limit (250 kB). This can impact web performance. diff --git a/test/statsCases/preset-normal/expected.txt b/test/statsCases/preset-normal/expected.txt index a10567f8b..6cf626423 100644 --- a/test/statsCases/preset-normal/expected.txt +++ b/test/statsCases/preset-normal/expected.txt @@ -1,6 +1,13 @@ Hash: c5a6856b43905ae12f17 Time: Xms -chunk {0} 0.js 54 bytes {3} [rendered] -chunk {1} 1.js 22 bytes {3} [rendered] -chunk {2} 2.js 44 bytes {0} [rendered] -chunk {3} main.js (main) 73 bytes [entry] [rendered] \ No newline at end of file + Asset Size Chunks Chunk Names + 0.js 238 bytes 0 [emitted] + 1.js 108 bytes 1 [emitted] + 2.js 204 bytes 2 [emitted] +main.js 6.1 kB 3 [emitted] main + [0] (webpack)/test/statsCases/preset-normal/a.js 22 bytes {3} [built] + [1] (webpack)/test/statsCases/preset-normal/b.js 22 bytes {1} [built] + [2] (webpack)/test/statsCases/preset-normal/c.js 54 bytes {0} [built] + [3] (webpack)/test/statsCases/preset-normal/d.js 22 bytes {2} [built] + [4] (webpack)/test/statsCases/preset-normal/e.js 22 bytes {2} [built] + [5] (webpack)/test/statsCases/preset-normal/index.js 51 bytes {3} [built] \ No newline at end of file diff --git a/test/statsCases/preset-verbose/expected.txt b/test/statsCases/preset-verbose/expected.txt index 5ad626004..be9a576cc 100644 --- a/test/statsCases/preset-verbose/expected.txt +++ b/test/statsCases/preset-verbose/expected.txt @@ -7,14 +7,17 @@ Time: Xms main.js 6.1 kB 3 [emitted] main Entrypoint main = main.js chunk {0} 0.js 54 bytes {3} [rendered] + > [5] (webpack)/test/statsCases/preset-verbose/index.js 3:0-16 [2] (webpack)/test/statsCases/preset-verbose/c.js 54 bytes {0} [depth 1] [built] amd require ./c [5] (webpack)/test/statsCases/preset-verbose/index.js 3:0-16 [] -> factory:Xms building:Xms = Xms chunk {1} 1.js 22 bytes {3} [rendered] + > [5] (webpack)/test/statsCases/preset-verbose/index.js 2:0-16 [1] (webpack)/test/statsCases/preset-verbose/b.js 22 bytes {1} [depth 1] [built] amd require ./b [5] (webpack)/test/statsCases/preset-verbose/index.js 2:0-16 [] -> factory:Xms building:Xms = Xms chunk {2} 2.js 44 bytes {0} [rendered] + > [2] (webpack)/test/statsCases/preset-verbose/c.js 1:0-52 [3] (webpack)/test/statsCases/preset-verbose/d.js 22 bytes {2} [depth 2] [built] require.ensure item ./d [2] (webpack)/test/statsCases/preset-verbose/c.js 1:0-52 [] -> factory:Xms building:Xms = Xms @@ -22,6 +25,7 @@ chunk {2} 2.js 44 bytes {0} [rendered] require.ensure item ./e [2] (webpack)/test/statsCases/preset-verbose/c.js 1:0-52 [] -> factory:Xms building:Xms = Xms chunk {3} main.js (main) 73 bytes [entry] [rendered] + > main [5] (webpack)/test/statsCases/preset-verbose/index.js [0] (webpack)/test/statsCases/preset-verbose/a.js 22 bytes {3} [depth 1] [built] cjs require ./a [5] (webpack)/test/statsCases/preset-verbose/index.js 1:0-14 [] -> factory:Xms building:Xms = Xms diff --git a/test/statsCases/resolve-plugin-context/expected.txt b/test/statsCases/resolve-plugin-context/expected.txt index a6da5097f..033a761bd 100644 --- a/test/statsCases/resolve-plugin-context/expected.txt +++ b/test/statsCases/resolve-plugin-context/expected.txt @@ -2,7 +2,6 @@ Hash: 94e1d97f3e1cf37e753f Time: Xms Asset Size Chunks Chunk Names bundle.js 2.88 kB 0 [emitted] main -chunk {0} bundle.js (main) 80 bytes [entry] [rendered] [0] (webpack)/test/statsCases/resolve-plugin-context/node_modules/xyz/index.js 0 bytes {0} [built] [1] (webpack)/test/statsCases/resolve-plugin-context/index.js 48 bytes {0} [built] [2] (webpack)/test/statsCases/resolve-plugin-context/node_modules/abc/index.js 16 bytes {0} [built] diff --git a/test/statsCases/reverse-sort-modules/expected.txt b/test/statsCases/reverse-sort-modules/expected.txt index 710321d88..12a361f8e 100644 --- a/test/statsCases/reverse-sort-modules/expected.txt +++ b/test/statsCases/reverse-sort-modules/expected.txt @@ -2,25 +2,24 @@ Hash: 8f4b66734cb63e0581be Time: Xms Asset Size Chunks Chunk Names main.js 5.79 kB 0 [emitted] main -chunk {0} main.js (main) 1.18 kB [entry] [rendered] - [30] (webpack)/test/statsCases/reverse-sort-modules/index.js 181 bytes {0} [built] - [28] (webpack)/test/statsCases/reverse-sort-modules/c.js?8 33 bytes {0} [built] - [27] (webpack)/test/statsCases/reverse-sort-modules/c.js?7 33 bytes {0} [built] - [26] (webpack)/test/statsCases/reverse-sort-modules/c.js?6 33 bytes {0} [built] - [25] (webpack)/test/statsCases/reverse-sort-modules/c.js?5 33 bytes {0} [built] - [24] (webpack)/test/statsCases/reverse-sort-modules/c.js?4 33 bytes {0} [built] - [23] (webpack)/test/statsCases/reverse-sort-modules/c.js?3 33 bytes {0} [built] - [22] (webpack)/test/statsCases/reverse-sort-modules/c.js?2 33 bytes {0} [built] - [21] (webpack)/test/statsCases/reverse-sort-modules/c.js?10 33 bytes {0} [built] - [20] (webpack)/test/statsCases/reverse-sort-modules/c.js?1 33 bytes {0} [built] - [9] (webpack)/test/statsCases/reverse-sort-modules/a.js?9 33 bytes {0} [built] - [8] (webpack)/test/statsCases/reverse-sort-modules/a.js?8 33 bytes {0} [built] - [7] (webpack)/test/statsCases/reverse-sort-modules/a.js?7 33 bytes {0} [built] - [6] (webpack)/test/statsCases/reverse-sort-modules/a.js?6 33 bytes {0} [built] - [5] (webpack)/test/statsCases/reverse-sort-modules/a.js?5 33 bytes {0} [built] - [4] (webpack)/test/statsCases/reverse-sort-modules/a.js?4 33 bytes {0} [built] - [3] (webpack)/test/statsCases/reverse-sort-modules/a.js?3 33 bytes {0} [built] - [2] (webpack)/test/statsCases/reverse-sort-modules/a.js?2 33 bytes {0} [built] - [1] (webpack)/test/statsCases/reverse-sort-modules/a.js?10 33 bytes {0} [built] - [0] (webpack)/test/statsCases/reverse-sort-modules/a.js?1 33 bytes {0} [built] - + 11 hidden modules \ No newline at end of file + [30] (webpack)/test/statsCases/reverse-sort-modules/index.js 181 bytes {0} [built] + [28] (webpack)/test/statsCases/reverse-sort-modules/c.js?8 33 bytes {0} [built] + [27] (webpack)/test/statsCases/reverse-sort-modules/c.js?7 33 bytes {0} [built] + [26] (webpack)/test/statsCases/reverse-sort-modules/c.js?6 33 bytes {0} [built] + [25] (webpack)/test/statsCases/reverse-sort-modules/c.js?5 33 bytes {0} [built] + [24] (webpack)/test/statsCases/reverse-sort-modules/c.js?4 33 bytes {0} [built] + [23] (webpack)/test/statsCases/reverse-sort-modules/c.js?3 33 bytes {0} [built] + [22] (webpack)/test/statsCases/reverse-sort-modules/c.js?2 33 bytes {0} [built] + [21] (webpack)/test/statsCases/reverse-sort-modules/c.js?10 33 bytes {0} [built] + [20] (webpack)/test/statsCases/reverse-sort-modules/c.js?1 33 bytes {0} [built] + [9] (webpack)/test/statsCases/reverse-sort-modules/a.js?9 33 bytes {0} [built] + [8] (webpack)/test/statsCases/reverse-sort-modules/a.js?8 33 bytes {0} [built] + [7] (webpack)/test/statsCases/reverse-sort-modules/a.js?7 33 bytes {0} [built] + [6] (webpack)/test/statsCases/reverse-sort-modules/a.js?6 33 bytes {0} [built] + [5] (webpack)/test/statsCases/reverse-sort-modules/a.js?5 33 bytes {0} [built] + [4] (webpack)/test/statsCases/reverse-sort-modules/a.js?4 33 bytes {0} [built] + [3] (webpack)/test/statsCases/reverse-sort-modules/a.js?3 33 bytes {0} [built] + [2] (webpack)/test/statsCases/reverse-sort-modules/a.js?2 33 bytes {0} [built] + [1] (webpack)/test/statsCases/reverse-sort-modules/a.js?10 33 bytes {0} [built] + [0] (webpack)/test/statsCases/reverse-sort-modules/a.js?1 33 bytes {0} [built] + + 11 hidden modules \ No newline at end of file diff --git a/test/statsCases/separate-css-bundle/expected.txt b/test/statsCases/separate-css-bundle/expected.txt index 41c9683d1..43cafb321 100644 --- a/test/statsCases/separate-css-bundle/expected.txt +++ b/test/statsCases/separate-css-bundle/expected.txt @@ -5,23 +5,25 @@ Child Asset Size Chunks Chunk Names c7ab11336573e45dc51e.js 2.62 kB 0 [emitted] main c815cf440254d4f3bba4e7041db00a28.css 26 bytes 0 [emitted] main - chunk {0} c7ab11336573e45dc51e.js, c815cf440254d4f3bba4e7041db00a28.css (main) 64 bytes [entry] [rendered] - [0] (webpack)/test/statsCases/separate-css-bundle/a/file.css 41 bytes {0} [built] - [1] (webpack)/test/statsCases/separate-css-bundle/a/index.js 23 bytes {0} [built] + [0] (webpack)/test/statsCases/separate-css-bundle/a/file.css 41 bytes {0} [built] + [1] (webpack)/test/statsCases/separate-css-bundle/a/index.js 23 bytes {0} [built] + [2] (webpack)/node_modules/css-loader!(webpack)/test/statsCases/separate-css-bundle/a/file.css 190 bytes [built] + [3] (webpack)/node_modules/css-loader/lib/css-base.js 1.46 kB [built] + [4] (webpack)/node_modules/style-loader/addStyles.js 6.91 kB [built] Child extract-text-webpack-plugin: - chunk {0} extract-text-webpack-plugin-output-filename 1.65 kB [entry] [rendered] - [0] (webpack)/node_modules/css-loader!(webpack)/test/statsCases/separate-css-bundle/a/file.css 190 bytes {0} [built] - [1] (webpack)/node_modules/css-loader/lib/css-base.js 1.46 kB {0} [built] + [0] (webpack)/node_modules/css-loader!(webpack)/test/statsCases/separate-css-bundle/a/file.css 190 bytes {0} [built] + [1] (webpack)/node_modules/css-loader/lib/css-base.js 1.46 kB {0} [built] Child Hash: 1139e89514abc13454ce Time: Xms Asset Size Chunks Chunk Names c7ab11336573e45dc51e.js 2.62 kB 0 [emitted] main a3f385680aef7a9bb2a517699532cc34.css 28 bytes 0 [emitted] main - chunk {0} c7ab11336573e45dc51e.js, a3f385680aef7a9bb2a517699532cc34.css (main) 64 bytes [entry] [rendered] - [0] (webpack)/test/statsCases/separate-css-bundle/b/file.css 41 bytes {0} [built] - [1] (webpack)/test/statsCases/separate-css-bundle/b/index.js 23 bytes {0} [built] + [0] (webpack)/test/statsCases/separate-css-bundle/b/file.css 41 bytes {0} [built] + [1] (webpack)/test/statsCases/separate-css-bundle/b/index.js 23 bytes {0} [built] + [2] (webpack)/node_modules/css-loader!(webpack)/test/statsCases/separate-css-bundle/b/file.css 192 bytes [built] + [3] (webpack)/node_modules/css-loader/lib/css-base.js 1.46 kB [built] + [4] (webpack)/node_modules/style-loader/addStyles.js 6.91 kB [built] Child extract-text-webpack-plugin: - chunk {0} extract-text-webpack-plugin-output-filename 1.65 kB [entry] [rendered] - [0] (webpack)/node_modules/css-loader!(webpack)/test/statsCases/separate-css-bundle/b/file.css 192 bytes {0} [built] - [1] (webpack)/node_modules/css-loader/lib/css-base.js 1.46 kB {0} [built] \ No newline at end of file + [0] (webpack)/node_modules/css-loader!(webpack)/test/statsCases/separate-css-bundle/b/file.css 192 bytes {0} [built] + [1] (webpack)/node_modules/css-loader/lib/css-base.js 1.46 kB {0} [built] \ No newline at end of file diff --git a/test/statsCases/simple-more-info/expected.txt b/test/statsCases/simple-more-info/expected.txt index dc090aaae..ecf254996 100644 --- a/test/statsCases/simple-more-info/expected.txt +++ b/test/statsCases/simple-more-info/expected.txt @@ -2,9 +2,5 @@ Hash: 0bd4f09244f0e8c60354 Time: Xms Asset Size Chunks Chunk Names bundle.js 2.47 kB 0 [emitted] main -chunk {0} bundle.js (main) 0 bytes [entry] [rendered] - > main [0] (webpack)/test/statsCases/simple-more-info/index.js - [0] (webpack)/test/statsCases/simple-more-info/index.js 0 bytes {0} [built] - factory:Xms building:Xms = Xms [0] (webpack)/test/statsCases/simple-more-info/index.js 0 bytes {0} [built] factory:Xms building:Xms = Xms \ No newline at end of file diff --git a/test/statsCases/simple/expected.txt b/test/statsCases/simple/expected.txt index 082e6d4d7..4974e2530 100644 --- a/test/statsCases/simple/expected.txt +++ b/test/statsCases/simple/expected.txt @@ -2,5 +2,4 @@ Hash: 0bd4f09244f0e8c60354 Time: Xms Asset Size Chunks Chunk Names bundle.js 2.47 kB 0 [emitted] main -chunk {0} bundle.js (main) 0 bytes [entry] [rendered] - [0] (webpack)/test/statsCases/simple/index.js 0 bytes {0} [built] \ No newline at end of file + [0] (webpack)/test/statsCases/simple/index.js 0 bytes {0} [built] \ No newline at end of file diff --git a/test/statsCases/tree-shaking/expected.txt b/test/statsCases/tree-shaking/expected.txt index daaca66cc..e91d3a2c1 100644 --- a/test/statsCases/tree-shaking/expected.txt +++ b/test/statsCases/tree-shaking/expected.txt @@ -2,7 +2,6 @@ Hash: 347e6d2384c1a580ac4d Time: Xms Asset Size Chunks Chunk Names bundle.js 7.33 kB 0 [emitted] main -chunk {0} bundle.js (main) 588 bytes [entry] [rendered] [0] (webpack)/test/statsCases/tree-shaking/a.js 13 bytes {0} [built] [exports: a] [only some exports used: a] diff --git a/test/statsCases/warnings-uglifyjs/expected.txt b/test/statsCases/warnings-uglifyjs/expected.txt index 45d780b2f..88e885015 100644 --- a/test/statsCases/warnings-uglifyjs/expected.txt +++ b/test/statsCases/warnings-uglifyjs/expected.txt @@ -2,7 +2,6 @@ Hash: 4beee256fa6b8f69eae8 Time: Xms Asset Size Chunks Chunk Names bundle.js 2.1 kB 0 [emitted] main -chunk {0} bundle.js (main) 1.04 kB [entry] [rendered] [0] (webpack)/buildin/module.js 495 bytes {0} [built] [1] (webpack)/test/statsCases/warnings-uglifyjs/a.js 249 bytes {0} [built] [2] (webpack)/test/statsCases/warnings-uglifyjs/index.js 299 bytes {0} [built]