From 98e636eb0bc9ff4b098df07f0629e8d86a40c778 Mon Sep 17 00:00:00 2001 From: Anshuman Verma Date: Thu, 2 Apr 2020 22:46:47 +0530 Subject: [PATCH 01/21] feat(webpack-cli): import flags from webpack core tests: stats negated flags chore: rebase tests: negated flags tests: resolve-flags chore: suggestion refactor: webpack-cli.js refactor: suggestion --- jest.config.js | 7 +- package.json | 2 +- packages/webpack-cli/lib/bootstrap.js | 1 - packages/webpack-cli/lib/utils/arg-parser.js | 1 - packages/webpack-cli/lib/utils/cli-flags.js | 42 +++ packages/webpack-cli/lib/webpack-cli.js | 22 ++ scripts/cleanupTest.js | 2 +- test/core-flags/amd-flag.test.js | 12 + test/core-flags/bail-flag.test.js | 19 ++ test/core-flags/cache-flags.test.js | 100 +++++++ test/core-flags/context-flag.test.js | 19 ++ test/core-flags/dependencies-flag.test.js | 19 ++ test/core-flags/devtool-flag.test.js | 18 ++ test/core-flags/experiments-flag.test.js | 26 ++ test/core-flags/externals-flags.test.js | 33 +++ .../core-flags/infrastructure-logging.test.js | 26 ++ test/core-flags/main.js | 1 + test/core-flags/module-flags.test.js | 46 +++ test/core-flags/node-flags.test.js | 40 +++ test/core-flags/optimization-flags.test.js | 68 +++++ test/core-flags/output-flags.test.js | 94 ++++++ test/core-flags/parallelism-flag.test.js | 12 + test/core-flags/performance-flags.test.js | 38 +++ test/core-flags/profile-flag.test.js | 19 ++ test/core-flags/records-flag.test.js | 26 ++ test/core-flags/resolve-flags.test.js | 39 +++ test/core-flags/stats-flags.test.js | 68 +++++ test/core-flags/watch-flags.test.js | 55 ++++ test/core-flags/webpack.config.js | 7 + test/utils/test-utils.js | 10 + test/version/version-multi-args.test.js | 4 +- yarn.lock | 274 +++++++++++++++++- 32 files changed, 1134 insertions(+), 16 deletions(-) create mode 100644 test/core-flags/amd-flag.test.js create mode 100644 test/core-flags/bail-flag.test.js create mode 100644 test/core-flags/cache-flags.test.js create mode 100644 test/core-flags/context-flag.test.js create mode 100644 test/core-flags/dependencies-flag.test.js create mode 100644 test/core-flags/devtool-flag.test.js create mode 100644 test/core-flags/experiments-flag.test.js create mode 100644 test/core-flags/externals-flags.test.js create mode 100644 test/core-flags/infrastructure-logging.test.js create mode 100644 test/core-flags/main.js create mode 100644 test/core-flags/module-flags.test.js create mode 100644 test/core-flags/node-flags.test.js create mode 100644 test/core-flags/optimization-flags.test.js create mode 100644 test/core-flags/output-flags.test.js create mode 100644 test/core-flags/parallelism-flag.test.js create mode 100644 test/core-flags/performance-flags.test.js create mode 100644 test/core-flags/profile-flag.test.js create mode 100644 test/core-flags/records-flag.test.js create mode 100644 test/core-flags/resolve-flags.test.js create mode 100644 test/core-flags/stats-flags.test.js create mode 100644 test/core-flags/watch-flags.test.js create mode 100644 test/core-flags/webpack.config.js diff --git a/jest.config.js b/jest.config.js index 200af3ed1d4..59eb975f718 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,5 +1,10 @@ +const { cli } = require('webpack'); + +//ignore core-flags test for webpack@4 +const ignorePattern = typeof cli !== 'undefined' ? ['/node_modules/'] : ['/node_modules/', '/test/core-flags']; + module.exports = { - testPathIgnorePatterns: ['/node_modules/'], + testPathIgnorePatterns: ignorePattern, // transformIgnorePatterns: ['.*(node_modules)(?!.*webpack-cli.*).*$'], testEnvironment: 'node', collectCoverage: true, diff --git a/package.json b/package.json index 4a1ae575e3a..ee48835e8df 100644 --- a/package.json +++ b/package.json @@ -126,7 +126,7 @@ "rimraf": "^3.0.2", "ts-jest": "^25.3.0", "typescript": "^3.9.5", - "webpack": "^4.43.0", + "webpack": "^5.0.0-beta.20", "yeoman-test": "^2.3.0" } } diff --git a/packages/webpack-cli/lib/bootstrap.js b/packages/webpack-cli/lib/bootstrap.js index 265f19278aa..57ba039f092 100644 --- a/packages/webpack-cli/lib/bootstrap.js +++ b/packages/webpack-cli/lib/bootstrap.js @@ -4,7 +4,6 @@ const logger = require('./utils/logger'); const cliExecuter = require('./utils/cli-executer'); const argParser = require('./utils/arg-parser'); require('./utils/process-log'); - process.title = 'webpack-cli'; const isCommandUsed = (commands) => diff --git a/packages/webpack-cli/lib/utils/arg-parser.js b/packages/webpack-cli/lib/utils/arg-parser.js index 1f009a3d155..7e79694d3b4 100644 --- a/packages/webpack-cli/lib/utils/arg-parser.js +++ b/packages/webpack-cli/lib/utils/arg-parser.js @@ -99,7 +99,6 @@ function argParser(options, args, argsOnly = false, name = '', helpFunction = un const opts = result.opts(); const unknownArgs = result.args; - args.forEach((arg) => { const flagName = arg.slice(5); const option = options.find((opt) => opt.name === flagName); diff --git a/packages/webpack-cli/lib/utils/cli-flags.js b/packages/webpack-cli/lib/utils/cli-flags.js index fe79445df57..20a80025b0c 100644 --- a/packages/webpack-cli/lib/utils/cli-flags.js +++ b/packages/webpack-cli/lib/utils/cli-flags.js @@ -1,3 +1,5 @@ +const { cli } = require('webpack'); + const HELP_GROUP = 'help'; const CONFIG_GROUP = 'config'; const BASIC_GROUP = 'basic'; @@ -6,6 +8,44 @@ const ADVANCED_GROUP = 'advanced'; const DISPLAY_GROUP = 'stats'; const ZERO_CONFIG_GROUP = 'zero-config'; +// Extract all the flages being exported from core. A list of cli flags generated by core +// can be found here https://github.com/webpack/webpack/blob/master/test/__snapshots__/Cli.test.js.snap +let flagsFromCore = + typeof cli !== 'undefined' + ? Object.entries(cli.getArguments()).map(([flag, meta]) => { + if (meta.simpleType === 'string') { + meta.type = String; + meta.usage = `--${flag} `; + } else if (meta.simpleType === 'number') { + meta.type = Number; + meta.usage = `--${flag} `; + } else { + meta.type = Boolean; + meta.negative = true; + meta.usage = `--${flag}`; + } + return { + ...meta, + name: flag, + group: 'core', + }; + }) + : []; + +// duplicate flags +const duplicateFlags = ['entry', 'mode', 'stats', 'watch', 'target']; +// broken flags +const brokenFlags = ['module-no-parse', 'module-no-parse-reset', 'optimization-no-emit-on-errors', 'watch-options-poll']; +// regExp Flags +const regExpFlags = ['module-expr-context-reg-exp', 'module-unknown-context-reg-exp', 'module-wrapped-context-reg-exp']; +// inFeasibleFlags https://github.com/webpack/webpack-cli/pull/1630#issuecomment-646992322 +const inFeasibleFlags = flagsFromCore.filter(({ name }) => { + return name.includes('module-rules-') || name.includes('alias-') || name.startsWith('output-library'); +}); +// filter all duplicate, broken and regExp flags +const flagsToFilter = [...duplicateFlags, ...brokenFlags, ...regExpFlags]; +flagsFromCore = flagsFromCore.filter((flag) => !flagsToFilter.includes(flag.name) && !inFeasibleFlags.includes(flag)); + module.exports = { groups: { HELP_GROUP, @@ -227,6 +267,7 @@ module.exports = { group: CONFIG_GROUP, description: 'Environment passed to the configuration when it is a function', }, + ...flagsFromCore, /* { name: "analyze", type: Boolean, @@ -241,4 +282,5 @@ module.exports = { group: BASIC_GROUP } */ ], + flagsFromCore: [...flagsFromCore], }; diff --git a/packages/webpack-cli/lib/webpack-cli.js b/packages/webpack-cli/lib/webpack-cli.js index 416e3426b44..7d1659f4488 100644 --- a/packages/webpack-cli/lib/webpack-cli.js +++ b/packages/webpack-cli/lib/webpack-cli.js @@ -10,6 +10,7 @@ class WebpackCLI extends GroupHelper { super(); this.groupMap = new Map(); this.groups = []; + this.args = {}; this.processingMessageBuffer = []; this.compilation = new Compiler(); this.defaultEntry = 'index'; @@ -42,6 +43,26 @@ class WebpackCLI extends GroupHelper { } } + /** + * Responsible for handling flags coming from webpack/webpack + * @private\ + * @returns {void} + */ + _handleCoreFlags() { + if (!this.groupMap.has('core')) { + return; + } + const coreFlags = this.groupMap.get('core'); + + // convert all the flags from map to single object + const coreConfig = coreFlags.reduce((allFlag, curFlag) => ({ ...allFlag, ...curFlag }), {}); + + const coreCliHelper = require('webpack').cli; + const coreCliArgs = coreCliHelper.getArguments(); + // Merge the core flag config with the compilerConfiguration + coreCliHelper.processArguments(coreCliArgs, this.compilerConfiguration, coreConfig); + } + /** * Expose commander argParser * @param {...any} args args for argParser @@ -222,6 +243,7 @@ class WebpackCLI extends GroupHelper { .then(() => this._handleDefaultEntry()) .then(() => this._handleGroupHelper(this.configGroup)) .then(() => this._handleGroupHelper(this.outputGroup)) + .then(() => this._handleCoreFlags()) .then(() => this._handleGroupHelper(this.basicGroup)) .then(() => this._handleGroupHelper(this.advancedGroup)) .then(() => this._handleGroupHelper(this.statsGroup)) diff --git a/scripts/cleanupTest.js b/scripts/cleanupTest.js index 6d3c5b8e61d..1d86780adbc 100644 --- a/scripts/cleanupTest.js +++ b/scripts/cleanupTest.js @@ -3,7 +3,7 @@ const rimraf = require('rimraf'); const { join } = require('path'); const collectTestFolders = require('./utils'); -const outputDirectories = ['bin', 'binary', 'dist', 'test-assets', 'test-plugin', 'test-loader']; +const outputDirectories = ['bin', 'binary', 'dist', 'test', 'test-assets', 'test-plugin', 'test-loader']; function folderStrategy(stats, file) { return stats.isDirectory() && outputDirectories.includes(file); diff --git a/test/core-flags/amd-flag.test.js b/test/core-flags/amd-flag.test.js new file mode 100644 index 00000000000..a21db34196f --- /dev/null +++ b/test/core-flags/amd-flag.test.js @@ -0,0 +1,12 @@ +'use strict'; + +const { run } = require('../utils/test-utils'); + +describe('--no-amd flag', () => { + it('should accept --no-amd', () => { + const { stderr, stdout } = run(__dirname, ['--no-amd']); + + expect(stderr).toBeFalsy(); + expect(stdout).toContain('amd: false'); + }); +}); diff --git a/test/core-flags/bail-flag.test.js b/test/core-flags/bail-flag.test.js new file mode 100644 index 00000000000..48587933155 --- /dev/null +++ b/test/core-flags/bail-flag.test.js @@ -0,0 +1,19 @@ +'use strict'; + +const { run } = require('../utils/test-utils'); + +describe('--bail flag', () => { + it('should set bail to true', () => { + const { stderr, stdout } = run(__dirname, ['--bail']); + + expect(stderr).toBeFalsy(); + expect(stdout).toContain('bail: true'); + }); + + it('should set bail to false', () => { + const { stderr, stdout } = run(__dirname, ['--no-bail']); + + expect(stderr).toBeFalsy(); + expect(stdout).toContain('bail: false'); + }); +}); diff --git a/test/core-flags/cache-flags.test.js b/test/core-flags/cache-flags.test.js new file mode 100644 index 00000000000..21c56d531ec --- /dev/null +++ b/test/core-flags/cache-flags.test.js @@ -0,0 +1,100 @@ +'use strict'; + +const { run } = require('../utils/test-utils'); +const { resolve } = require('path'); + +describe('cahche related flags from core', () => { + it('should be successful with --cache ', () => { + const { stderr, stdout } = run(__dirname, ['--cache']); + + expect(stderr).toBeFalsy(); + expect(stdout).toContain(`type: 'memory'`); + }); + + it('should be successful with --no-cache ', () => { + const { stderr, stdout } = run(__dirname, ['--no-cache']); + + expect(stderr).toBeFalsy(); + expect(stdout).toContain('cache: false'); + }); + + it('should set cache.type', () => { + const { stderr, stdout } = run(__dirname, ['--cache-type', 'filesystem']); + + expect(stderr).toBeFalsy(); + expect(stdout).toContain(`type: 'filesystem'`); + }); + + it('should set cache.cacheDirectory with --cache-cache-directory', () => { + const { stderr, stdout } = run(__dirname, ['--cache-type', 'filesystem', '--cache-cache-directory', '/test-cache-path']); + const path = resolve('/test-cache-path'); + + expect(stderr).toBeFalsy(); + if (process.platform === 'win32') { + // for windows + expect(stdout).toContain('test-cache-path'); + } else { + expect(stdout).toContain(`cacheDirectory: '${path}'`); + } + }); + + it('should set cache.cacheLocation with --cache-cache-locations', () => { + const { stderr, stdout } = run(__dirname, ['--cache-type', 'filesystem', '--cache-cache-location', '/test-locate-cache']); + const path = resolve('/test-locate-cache'); + + expect(stderr).toBeFalsy(); + if (process.platform === 'win32') { + // for windows + expect(stdout).toContain('test-locate-cache'); + } else { + expect(stdout).toContain(`cacheLocation: '${path}'`); + } + }); + + it('should set cache.hashAlgorithm with --cache-hash-algorithm', () => { + const { stderr, stdout } = run(__dirname, ['--cache-type', 'filesystem', '--cache-hash-algorithm', 'sha256']); + + expect(stderr).toBeFalsy(); + expect(stdout).toContain(`hashAlgorithm: 'sha256'`); + }); + + it('should set cache.managedPaths with --cache-managed-paths', () => { + const { stderr, stdout } = run(__dirname, ['--cache-type', 'memory', '--cache-managed-paths', '/test-manage-path']); + + expect(stderr).toBeFalsy(); + if (process.platform === 'win32') { + // for windows + expect(stdout).toContain('test-manage-path'); + } else { + expect(stdout).toContain(`managedPaths: [ '/test-manage-path' ]`); + } + }); + + it('should reset cache.managedPaths with --cache-managed-paths-reset', () => { + const { stderr, stdout } = run(__dirname, ['--cache-type', 'filesystem', '--cache-managed-paths-reset']); + + expect(stderr).toBeFalsy(); + expect(stdout).toContain(`managedPaths: []`); + }); + + it('should set cache.name with --cache-name', () => { + const { stderr, stdout } = run(__dirname, ['--cache-type', 'filesystem', '--cache-name', 'cli-test']); + + expect(stderr).toBeFalsy(); + expect(stdout).toContain(`name: 'cli-test'`); + }); + + it('should set cache.store with --cache-store', () => { + const { stderr, stdout } = run(__dirname, ['--cache-type', 'filesystem', '--cache-store', 'pack']); + + expect(stderr).toBeFalsy(); + expect(stdout).toContain(`store: 'pack'`); + }); + + it('should set cache.version with --cache-version', () => { + const { stderr, stdout } = run(__dirname, ['--cache-type', 'filesystem', '--cache-version', '1.1.3']); + + expect(stderr).toBeFalsy(); + expect(stdout).toContain(`version: '1.1.3'`); + }); +}); diff --git a/test/core-flags/context-flag.test.js b/test/core-flags/context-flag.test.js new file mode 100644 index 00000000000..c26d5b07d39 --- /dev/null +++ b/test/core-flags/context-flag.test.js @@ -0,0 +1,19 @@ +'use strict'; + +const { run } = require('../utils/test-utils'); +const { resolve } = require('path'); + +describe('--context flag', () => { + it('should allow to set context', () => { + const { stderr, stdout } = run(__dirname, ['--context', '/test-context-path']); + const path = resolve('/test-context-path'); + + expect(stderr).toBeFalsy(); + if (process.platform === 'win32') { + // for windows + expect(stdout).toContain('test-context-path'); + } else { + expect(stdout).toContain(`context: '${path}'`); + } + }); +}); diff --git a/test/core-flags/dependencies-flag.test.js b/test/core-flags/dependencies-flag.test.js new file mode 100644 index 00000000000..251c6f51bf3 --- /dev/null +++ b/test/core-flags/dependencies-flag.test.js @@ -0,0 +1,19 @@ +'use strict'; + +const { run } = require('../utils/test-utils'); + +describe('--dependencies and related flags', () => { + it('should allow to set dependencies option', () => { + const { stderr, stdout } = run(__dirname, ['--dependencies', 'lodash']); + + expect(stderr).toBeFalsy(); + expect(stdout).toContain(`dependencies: [ 'lodash' ]`); + }); + + it('should reset dependencies option', () => { + const { stderr, stdout } = run(__dirname, ['--dependencies-reset']); + + expect(stderr).toBeFalsy(); + expect(stdout).toContain('dependencies: []'); + }); +}); diff --git a/test/core-flags/devtool-flag.test.js b/test/core-flags/devtool-flag.test.js new file mode 100644 index 00000000000..60aa498ad20 --- /dev/null +++ b/test/core-flags/devtool-flag.test.js @@ -0,0 +1,18 @@ +'use strict'; + +const { run } = require('../utils/test-utils'); + +describe('--devtool flag', () => { + it('should set devtool option', () => { + const { stderr, stdout } = run(__dirname, ['--devtool', 'source-map']); + + expect(stderr).toBeFalsy(); + expect(stdout).toContain(`devtool: 'source-map'`); + }); + + it('should throw error for invalid config', () => { + const { stderr } = run(__dirname, ['--devtool', 'invalid']); + + expect(stderr).toContain('ValidationError: Invalid configuration object'); + }); +}); diff --git a/test/core-flags/experiments-flag.test.js b/test/core-flags/experiments-flag.test.js new file mode 100644 index 00000000000..b1d808c889a --- /dev/null +++ b/test/core-flags/experiments-flag.test.js @@ -0,0 +1,26 @@ +'use strict'; + +const { run, hyphenToUpperCase } = require('../utils/test-utils'); +const { flagsFromCore } = require('../../packages/webpack-cli/lib/utils/cli-flags'); + +const experimentsFlags = flagsFromCore.filter(({ name }) => name.startsWith('experiments-')); + +describe('experiments option related flag', () => { + experimentsFlags.forEach((flag) => { + // extract property name from flag name + const property = flag.name.split('experiments-')[1]; + const propName = hyphenToUpperCase(property); + + it(`should config ${flag.name} correctly`, () => { + const { stderr, stdout } = run(__dirname, [`--${flag.name}`]); + expect(stderr).toBeFalsy(); + expect(stdout).toContain(`${propName}: true`); + }); + + it(`should config --no-${flag.name} correctly`, () => { + const { stderr, stdout } = run(__dirname, [`--no-${flag.name}`]); + expect(stderr).toBeFalsy(); + expect(stdout).toContain(`${propName}: false`); + }); + }); +}); diff --git a/test/core-flags/externals-flags.test.js b/test/core-flags/externals-flags.test.js new file mode 100644 index 00000000000..83bc6f3c00f --- /dev/null +++ b/test/core-flags/externals-flags.test.js @@ -0,0 +1,33 @@ +'use strict'; + +const { run } = require('../utils/test-utils'); + +describe('externals related flag', () => { + it('should set externals properly', () => { + const { stderr, stdout } = run(__dirname, ['--externals', './main.js']); + + expect(stderr).toBeFalsy(); + expect(stdout).toContain(`externals: [ './main.js' ]`); + }); + + it('should set externalsType properly', () => { + const { stderr, stdout } = run(__dirname, ['--externals', 'var']); + + expect(stderr).toBeFalsy(); + expect(stdout).toContain(`externalsType: 'var'`); + }); + + it('should accept --external-type values', () => { + const { stderr, stdout } = run(__dirname, ['--externals-type', 'var']); + + expect(stderr).toBeFalsy(); + expect(stdout).toContain(`externalsType: 'var'`); + }); + + it('should reset externals', () => { + const { stderr, stdout } = run(__dirname, ['--externals-reset']); + + expect(stderr).toBeFalsy(); + expect(stdout).toContain(`externals: []`); + }); +}); diff --git a/test/core-flags/infrastructure-logging.test.js b/test/core-flags/infrastructure-logging.test.js new file mode 100644 index 00000000000..028523bb0d9 --- /dev/null +++ b/test/core-flags/infrastructure-logging.test.js @@ -0,0 +1,26 @@ +'use strict'; + +const { run } = require('../utils/test-utils'); + +describe('externals related flag', () => { + it('should set infrastructureLogging.debug properly', () => { + const { stderr, stdout } = run(__dirname, ['--infrastructure-logging-debug', 'myPlugin']); + + expect(stderr).toBeFalsy(); + expect(stdout).toContain(`debug: [ 'myPlugin' ]`); + }); + + it('should reset infrastructureLogging.debug to []', () => { + const { stderr, stdout } = run(__dirname, ['--infrastructure-logging-debug-reset']); + + expect(stderr).toBeFalsy(); + expect(stdout).toContain(`debug: []`); + }); + + it('should set infrastructureLogging.level properly', () => { + const { stderr, stdout } = run(__dirname, ['--infrastructure-logging-level', 'log']); + + expect(stderr).toBeFalsy(); + expect(stdout).toContain(`level: 'log'`); + }); +}); diff --git a/test/core-flags/main.js b/test/core-flags/main.js new file mode 100644 index 00000000000..dcab1dbfb46 --- /dev/null +++ b/test/core-flags/main.js @@ -0,0 +1 @@ +console.log('core-flags tests'); diff --git a/test/core-flags/module-flags.test.js b/test/core-flags/module-flags.test.js new file mode 100644 index 00000000000..caa20d03081 --- /dev/null +++ b/test/core-flags/module-flags.test.js @@ -0,0 +1,46 @@ +'use strict'; + +const { run, hyphenToUpperCase } = require('../utils/test-utils'); +const { flagsFromCore } = require('../../packages/webpack-cli/lib/utils/cli-flags'); + +const moduleFlags = flagsFromCore.filter(({ name }) => name.startsWith('module-')); + +describe('module config related flag', () => { + moduleFlags.forEach((flag) => { + // extract property name from flag name + const property = flag.name.split('module-')[1]; + const propName = hyphenToUpperCase(property); + + if (flag.type === Boolean) { + it(`should config --${flag.name} correctly`, () => { + const { stderr, stdout } = run(__dirname, [`--${flag.name}`]); + expect(stderr).toBeFalsy(); + if (flag.name.includes('-reset')) { + const option = propName.split('Reset')[0]; + expect(stdout).toContain(`${option}: []`); + } else { + expect(stdout).toContain(`${propName}: true`); + } + }); + + it(`should config --no-${flag.name} correctly`, () => { + const { stderr, stdout } = run(__dirname, [`--no-${flag.name}`]); + expect(stderr).toBeFalsy(); + if (flag.name.includes('-reset')) { + const option = propName.split('Reset')[0]; + expect(stdout).toContain(`${option}: []`); + } else { + expect(stdout).toContain(`${propName}: false`); + } + }); + } + + if (flag.type === String) { + it(`should config --${flag.name} correctly`, () => { + const { stderr, stdout } = run(__dirname, [`--${flag.name}`, 'value']); + expect(stderr).toBeFalsy(); + expect(stdout).toContain(`${propName}: 'value'`); + }); + } + }); +}); diff --git a/test/core-flags/node-flags.test.js b/test/core-flags/node-flags.test.js new file mode 100644 index 00000000000..85522283ace --- /dev/null +++ b/test/core-flags/node-flags.test.js @@ -0,0 +1,40 @@ +'use strict'; + +const { run } = require('../utils/test-utils'); + +describe('node option related flags', () => { + it('should config node option', () => { + const { stderr, stdout } = run(__dirname, ['--node']); + + expect(stderr).toBeFalsy(); + expect(stdout).toContain(`node: { global: true, __filename: 'mock', __dirname: 'mock' }`); + }); + + it('should config node option to false', () => { + const { stderr, stdout } = run(__dirname, ['--no-node']); + + expect(stderr).toBeFalsy(); + expect(stdout).toContain('node: false'); + }); + + it('should set node.global equals to true', () => { + const { stderr, stdout } = run(__dirname, ['--node']); + + expect(stderr).toBeFalsy(); + expect(stdout).toContain('global: true'); + }); + + it('should set node.filename correctly', () => { + const { stderr, stdout } = run(__dirname, ['--node-filename', 'mock']); + + expect(stderr).toBeFalsy(); + expect(stdout).toContain(`__filename: 'mock'`); + }); + + it('should set node.filename correctly', () => { + const { stderr, stdout } = run(__dirname, ['--node-dirname', 'mock']); + + expect(stderr).toBeFalsy(); + expect(stdout).toContain(`__dirname: 'mock'`); + }); +}); diff --git a/test/core-flags/optimization-flags.test.js b/test/core-flags/optimization-flags.test.js new file mode 100644 index 00000000000..22502dfe87f --- /dev/null +++ b/test/core-flags/optimization-flags.test.js @@ -0,0 +1,68 @@ +'use strict'; + +const { run, hyphenToUpperCase } = require('../utils/test-utils'); +const { flagsFromCore } = require('../../packages/webpack-cli/lib/utils/cli-flags'); + +const optimizationFlags = flagsFromCore.filter(({ name }) => name.startsWith('optimization-')); + +describe('optimization config related flag', () => { + optimizationFlags.forEach((flag) => { + // extract property name from flag name + let property = flag.name.split('optimization-')[1]; + if (flag.name.includes('split-chunks')) { + property = flag.name.split('optimization-split-chunks-')[1]; + } + const propName = hyphenToUpperCase(property); + + if (flag.type === Boolean) { + it(`should config --${flag.name} correctly`, () => { + const { stderr, stdout } = run(__dirname, [`--${flag.name}`]); + expect(stderr).toBeFalsy(); + if (flag.name === 'optimization-split-chunks') { + expect(stdout).toContain(`chunks: 'async'`); + expect(stdout).toContain(`minChunks: 1`); + } else { + expect(stdout).toContain(`${propName}: true`); + } + }); + + it(`should config --no-${flag.name} correctly`, () => { + const { stderr, stdout } = run(__dirname, [`--no-${flag.name}`]); + expect(stderr).toBeFalsy(); + if (flag.name === 'optimization-split-chunks') { + expect(stdout).toContain('splitChunks: false'); + } else { + expect(stdout).toContain(`${propName}: false`); + } + }); + } + + // ignoring optimization-runtime-* and split-chunks-fallback-* flags because WebpackClITestPlugin logs [Object] + // need improve the plugin to log for multi-level options i.e, optimization.runtime + if (flag.type === String && !flag.name.includes('runtime-') && !flag.name.includes('fallback-')) { + it(`should config --${flag.name} correctly`, () => { + let { stderr, stdout } = run(__dirname, [`--${flag.name}`, 'named']); + expect(stderr).toBeFalsy(); + if (flag.name === 'optimization-split-chunks-chunks') { + stdout = run(__dirname, [`--${flag.name}`, 'initial']).stdout; + expect(stdout).toContain(`chunks: 'initial'`); + } else { + expect(stdout).toContain(`${propName}: 'named'`); + } + }); + } + + if (flag.type === Number && !flag.name.includes('fallback-')) { + it(`should config --${flag.name} correctly`, () => { + const { stderr, stdout } = run(__dirname, [`--${flag.name}`, '10']); + expect(stderr).toBeFalsy(); + if (flag.name === 'optimization-split-chunks') { + expect(stdout).toContain(`chunks: 'async'`); + expect(stdout).toContain(`minChunks: 1`); + } else { + expect(stdout).toContain(`${propName}: 10`); + } + }); + } + }); +}); diff --git a/test/core-flags/output-flags.test.js b/test/core-flags/output-flags.test.js new file mode 100644 index 00000000000..1bea6ec7308 --- /dev/null +++ b/test/core-flags/output-flags.test.js @@ -0,0 +1,94 @@ +'use strict'; + +const { run, hyphenToUpperCase } = require('../utils/test-utils'); +const { flagsFromCore } = require('../../packages/webpack-cli/lib/utils/cli-flags'); + +const outputFlags = flagsFromCore.filter(({ name }) => name.startsWith('output-')); + +describe('module config related flag', () => { + outputFlags.forEach((flag) => { + // extract property name from flag name + const property = flag.name.split('output-')[1]; + const propName = hyphenToUpperCase(property); + + if (flag.type === Boolean) { + it(`should config --${flag.name} correctly`, () => { + let { stderr, stdout } = run(__dirname, [`--${flag.name}`]); + + if (flag.name === 'output-module') { + //'output.module: true' is only allowed when 'experiments.outputModule' is enabled + stdout = run(__dirname, [`--${flag.name}`, '--experiments-output-module']).stdout; + expect(stdout).toContain('module: true'); + } else if (flag.name.includes('-reset')) { + const option = propName.split('Reset')[0]; + expect(stderr).toBeFalsy(); + expect(stdout).toContain(`${option}: []`); + } else { + expect(stderr).toBeFalsy(); + expect(stdout).toContain(`${propName}: true`); + } + }); + + it(`should config --no-${flag.name} correctly`, () => { + const { stderr, stdout } = run(__dirname, [`--no-${flag.name}`]); + + if (flag.name.includes('-reset')) { + const option = propName.split('Reset')[0]; + expect(stderr).toBeFalsy(); + expect(stdout).toContain(`${option}: []`); + } else { + expect(stderr).toBeFalsy(); + expect(stdout).toContain(`${propName}: false`); + } + }); + } + + if (flag.type === Number) { + it(`should config --${flag.name} correctly`, () => { + const { stderr, stdout } = run(__dirname, [`--${flag.name}`, '10']); + + expect(stderr).toBeFalsy(); + expect(stdout).toContain(`${propName}: 10`); + }); + } + + if (flag.type === String) { + it(`should config --${flag.name} correctly`, () => { + let { stderr, stdout } = run(__dirname, [`--${flag.name}`, 'test']); + + if (flag.name === 'output-cross-origin-loading') { + stdout = run(__dirname, [`--${flag.name}`, 'anonymous']).stdout; + + expect(stderr).toBeFalsy(); + expect(stdout).toContain(`${propName}: 'anonymous'`); + } else if (flag.name === 'output-enabled-library-type') { + stdout = run(__dirname, [`--${flag.name}`, 'amd']).stdout; + + expect(stderr).toBeFalsy(); + expect(stdout).toContain(`${propName}: 'amd'`); + } else if (flag.name === 'output-hash-function') { + stdout = run(__dirname, [`--${flag.name}`, 'sha256']).stdout; + stderr = run(__dirname, [`--${flag.name}`, 'sha256']).stderr; + + expect(stderr).toBeFalsy(); + expect(stdout).toContain(`hashFunction: 'sha256'`); + } else if (flag.name === 'output-script-type') { + stdout = run(__dirname, [`--${flag.name}`, 'module']).stdout; + + expect(stderr).toBeFalsy(); + expect(stdout).toContain(`${propName}: 'module'`); + } else if (flag.name === 'output-enabled-library-types') { + stdout = run(__dirname, [`--${flag.name}`, 'var']).stdout; + + expect(stderr).toBeFalsy(); + expect(stdout).toContain(`${propName}: [ 'var' ]`); + } else if (flag.name === 'output-path') { + expect(stdout).toContain('test'); + } else { + expect(stderr).toBeFalsy(); + expect(stdout).toContain(`${propName}: 'test'`); + } + }); + } + }); +}); diff --git a/test/core-flags/parallelism-flag.test.js b/test/core-flags/parallelism-flag.test.js new file mode 100644 index 00000000000..02f1f878be7 --- /dev/null +++ b/test/core-flags/parallelism-flag.test.js @@ -0,0 +1,12 @@ +'use strict'; + +const { run } = require('../utils/test-utils'); + +describe('--parallelism flag', () => { + it('should set parallelism to the value passed', () => { + const { stderr, stdout } = run(__dirname, ['--parallelism', '50']); + + expect(stderr).toBeFalsy(); + expect(stdout).toContain('parallelism: 50'); + }); +}); diff --git a/test/core-flags/performance-flags.test.js b/test/core-flags/performance-flags.test.js new file mode 100644 index 00000000000..106f5af725f --- /dev/null +++ b/test/core-flags/performance-flags.test.js @@ -0,0 +1,38 @@ +'use strict'; + +const { run, hyphenToUpperCase } = require('../utils/test-utils'); +const { flagsFromCore } = require('../../packages/webpack-cli/lib/utils/cli-flags'); + +const performanceFlags = flagsFromCore.filter(({ name }) => name.startsWith('performance-')); + +describe('module config related flag', () => { + it(`should config --performance option correctly`, () => { + const { stderr, stdout } = run(__dirname, [`--no-performance`]); + + expect(stderr).toBeFalsy(); + expect(stdout).toContain('performance: false'); + }); + + performanceFlags.forEach((flag) => { + // extract property name from flag name + const property = flag.name.split('performance-')[1]; + const propName = hyphenToUpperCase(property); + + if (flag.type === Number) { + it(`should config --${flag.name} correctly`, () => { + const { stderr, stdout } = run(__dirname, [`--${flag.name}`, '10']); + + expect(stderr).toBeFalsy(); + expect(stdout).toContain(`${propName}: 10`); + }); + } + + if (flag.type === String) { + it(`should config --${flag.name} correctly`, () => { + const { stderr, stdout } = run(__dirname, [`--${flag.name}`, 'warning']); + expect(stderr).toBeFalsy(); + expect(stdout).toContain(`${propName}: 'warning'`); + }); + } + }); +}); diff --git a/test/core-flags/profile-flag.test.js b/test/core-flags/profile-flag.test.js new file mode 100644 index 00000000000..2ba4d1169b2 --- /dev/null +++ b/test/core-flags/profile-flag.test.js @@ -0,0 +1,19 @@ +'use strict'; + +const { run } = require('../utils/test-utils'); + +describe('--profile flag', () => { + it('should set profile to true', () => { + const { stderr, stdout } = run(__dirname, ['--profile']); + + expect(stderr).toBeFalsy(); + expect(stdout).toContain('profile: true'); + }); + + it('should set profile to false', () => { + const { stderr, stdout } = run(__dirname, ['--no-profile']); + + expect(stderr).toBeFalsy(); + expect(stdout).toContain('profile: false'); + }); +}); diff --git a/test/core-flags/records-flag.test.js b/test/core-flags/records-flag.test.js new file mode 100644 index 00000000000..e4724266dfb --- /dev/null +++ b/test/core-flags/records-flag.test.js @@ -0,0 +1,26 @@ +'use strict'; + +const { run } = require('../utils/test-utils'); + +describe('module config related flag', () => { + it('should config records-path correctly', () => { + const { stderr, stdout } = run(__dirname, ['--records-path', './bin/records.json']); + + expect(stderr).toBeFalsy(); + expect(stdout).toContain('records.json'); + }); + + it('should config records-input-path correctly', () => { + const { stderr, stdout } = run(__dirname, ['--records-input-path', './bin/records.json']); + + expect(stderr).toBeFalsy(); + expect(stdout).toContain('records.json'); + }); + + it('should config records-output-path correctly', () => { + const { stderr, stdout } = run(__dirname, ['--records-output-path', './bin/records.json']); + + expect(stderr).toBeFalsy(); + expect(stdout).toContain('records.json'); + }); +}); diff --git a/test/core-flags/resolve-flags.test.js b/test/core-flags/resolve-flags.test.js new file mode 100644 index 00000000000..85c5bfdb1ca --- /dev/null +++ b/test/core-flags/resolve-flags.test.js @@ -0,0 +1,39 @@ +'use strict'; + +const { run, hyphenToUpperCase } = require('../utils/test-utils'); +const { flagsFromCore } = require('../../packages/webpack-cli/lib/utils/cli-flags'); + +const resolveFlags = flagsFromCore.filter(({ name }) => name.startsWith('resolve')); + +describe('resolve config related flag', () => { + resolveFlags.forEach((flag) => { + // extract property name from flag name + let property = flag.name.split('resolve-')[1]; + if (flag.name.startsWith('resolve-loader')) { + property = flag.name.split('resolve-loader-')[1]; + } + const propName = hyphenToUpperCase(property); + + if (flag.type === Boolean) { + it(`should config --${flag.name} correctly`, () => { + const { stderr, stdout } = run(__dirname, [`--${flag.name}`]); + + expect(stderr).toBeFalsy(); + if (flag.name.includes('reset')) { + const option = propName.split('Reset')[0]; + expect(stdout).toContain(`${option}: []`); + } else { + expect(stdout).toContain(`${propName}: true`); + } + }); + } + + if (flag.type === String) { + it(`should config --${flag.name} correctly`, () => { + const { stderr, stdout } = run(__dirname, [`--${flag.name}`, 'browser']); + expect(stderr).toBeFalsy(); + expect(stdout).toContain(`${propName}: [ 'browser' ]`); + }); + } + }); +}); diff --git a/test/core-flags/stats-flags.test.js b/test/core-flags/stats-flags.test.js new file mode 100644 index 00000000000..c4033cf5ef7 --- /dev/null +++ b/test/core-flags/stats-flags.test.js @@ -0,0 +1,68 @@ +'use strict'; + +const { run, hyphenToUpperCase } = require('../utils/test-utils'); +const { flagsFromCore } = require('../../packages/webpack-cli/lib/utils/cli-flags'); + +const statsFlags = flagsFromCore.filter(({ name }) => name.startsWith('stats-')); + +describe('stats config related flag', () => { + statsFlags.forEach((flag) => { + // extract property name from flag name + const property = flag.name.split('stats-')[1]; + const propName = hyphenToUpperCase(property); + + if (flag.type === Boolean) { + it(`should config --${flag.name} correctly`, () => { + const { stderr, stdout } = run(__dirname, [`--${flag.name}`]); + + expect(stderr).toBeFalsy(); + if (flag.name.includes('reset')) { + const option = propName.split('Reset')[0]; + expect(stdout).toContain(`stats: { ${option}: [] }`); + } else { + expect(stdout).toContain(`stats: { ${propName}: true }`); + } + }); + + it(`should config --no-${flag.name} correctly`, () => { + const { stderr, stdout } = run(__dirname, [`--no-${flag.name}`]); + + expect(stderr).toBeFalsy(); + if (flag.name.includes('reset')) { + expect(stdout).toContain(`stats: {}`); + } else { + expect(stdout).toContain(`stats: { ${propName}: false }`); + } + }); + } + + if (flag.type === Number) { + it(`should config --${flag.name} correctly`, () => { + const { stderr, stdout } = run(__dirname, [`--${flag.name}`, '10']); + expect(stderr).toBeFalsy(); + expect(stdout).toContain(`stats: { ${propName}: 10 }`); + }); + } + + if (flag.type === String) { + const acceptsSingleValue = ['preset', 'modulesSort', 'logging', 'chunksSort', 'assetsSort']; + + it(`should config --${flag.name} correctly`, () => { + let { stderr, stdout } = run(__dirname, [`--${flag.name}`, 'log']); + expect(stderr).toBeFalsy(); + if (flag.name.includes('stats-colors')) { + const option = flag.name.split('stats-colors-')[1]; + stdout = run(__dirname, [`--${flag.name}`, 'u001b[32m']).stdout; + + expect(stdout).toContain(`stats: { colors: { ${option}: 'u001b[32m' } }`); + } else if (acceptsSingleValue.includes(propName)) { + expect(stdout).toContain(`stats: { ${propName}: 'log' }`); + } else if (flag.name === 'stats-context') { + expect(stdout).toContain('log'); + } else { + expect(stdout).toContain(`stats: { ${propName}: [ 'log' ] }`); + } + }); + } + }); +}); diff --git a/test/core-flags/watch-flags.test.js b/test/core-flags/watch-flags.test.js new file mode 100644 index 00000000000..871c8e54af7 --- /dev/null +++ b/test/core-flags/watch-flags.test.js @@ -0,0 +1,55 @@ +'use strict'; + +const { run, hyphenToUpperCase } = require('../utils/test-utils'); +const { flagsFromCore } = require('../../packages/webpack-cli/lib/utils/cli-flags'); + +const watchFlags = flagsFromCore.filter(({ name }) => name.startsWith('watch')); + +describe('watch config related flag', () => { + watchFlags.forEach((flag) => { + // extract property name from flag name + const property = flag.name.split('watch-options-')[1]; + const propName = hyphenToUpperCase(property); + + if (flag.type === Boolean) { + it(`should config --${flag.name} correctly`, () => { + const { stderr, stdout } = run(__dirname, [`--${flag.name}`]); + + expect(stderr).toBeFalsy(); + if (flag.name.includes('reset')) { + expect(stdout).toContain(`watchOptions: { ignored: [] }`); + } else { + expect(stdout).toContain(`watchOptions: { ${propName}: true }`); + } + }); + + it(`should config --no-${flag.name} correctly`, () => { + const { stderr, stdout } = run(__dirname, [`--no-${flag.name}`]); + + expect(stderr).toBeFalsy(); + if (flag.name.includes('reset')) { + expect(stdout).toContain('watch: false'); + } else { + expect(stdout).toContain(`watchOptions: { ${propName}: false }`); + } + }); + } + + if (flag.type === Number) { + it(`should config --${flag.name} correctly`, () => { + const { stderr, stdout } = run(__dirname, [`--${flag.name}`, '10']); + + expect(stderr).toBeFalsy(); + expect(stdout).toContain(`watchOptions: { ${propName}: 10 }`); + }); + } + + if (flag.type === String) { + it(`should config --${flag.name} correctly`, () => { + const { stderr, stdout } = run(__dirname, [`--${flag.name}`, 'ignore.js']); + expect(stderr).toBeFalsy(); + expect(stdout).toContain(`watchOptions: { ${propName}: [ 'ignore.js' ] }`); + }); + } + }); +}); diff --git a/test/core-flags/webpack.config.js b/test/core-flags/webpack.config.js new file mode 100644 index 00000000000..b36297d5cd8 --- /dev/null +++ b/test/core-flags/webpack.config.js @@ -0,0 +1,7 @@ +const WebpackCLITestPlugin = require('../utils/webpack-cli-test-plugin'); + +module.exports = { + entry: './main.js', + mode: 'development', + plugins: [new WebpackCLITestPlugin()], +}; diff --git a/test/utils/test-utils.js b/test/utils/test-utils.js index 664d44a62f4..4c207fc692d 100644 --- a/test/utils/test-utils.js +++ b/test/utils/test-utils.js @@ -251,6 +251,15 @@ const runServe = (args, testPath) => { const runInfo = (args, testPath) => { return run(testPath, ['info'].concat(args), false); }; + +const hyphenToUpperCase = (name) => { + if (!name) { + return name; + } + return name.replace(/-([a-z])/g, function (g) { + return g[1].toUpperCase(); + }); +}; module.exports = { run, @@ -263,4 +272,5 @@ module.exports = { copyFileAsync, runInstall, runInfo, + hyphenToUpperCase, }; diff --git a/test/version/version-multi-args.test.js b/test/version/version-multi-args.test.js index 606290df37f..b2d31701bcf 100644 --- a/test/version/version-multi-args.test.js +++ b/test/version/version-multi-args.test.js @@ -8,7 +8,7 @@ describe('version flag with multiple arguments', () => { const { stdout, stderr } = run(__dirname, ['version', 'help'], false); expect(stdout).not.toContain(pkgJSON.version); - const uniqueIdentifier = 'Made with ♥️ by the webpack team'; + const uniqueIdentifier = '⬡ webpack ⬡'; expect(stdout).toContain(uniqueIdentifier); expect(stderr).toHaveLength(0); }); @@ -17,7 +17,7 @@ describe('version flag with multiple arguments', () => { const { stdout, stderr } = run(__dirname, ['version', '--help'], false); expect(stdout).not.toContain(pkgJSON.version); - const uniqueIdentifier = 'Made with ♥️ by the webpack team'; + const uniqueIdentifier = '⬡ webpack ⬡'; expect(stdout).toContain(uniqueIdentifier); expect(stderr).toHaveLength(0); }); diff --git a/yarn.lock b/yarn.lock index cedd97d2d96..acb7850b610 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2105,6 +2105,13 @@ "@nodelib/fs.scandir" "2.1.3" fastq "^1.6.0" +"@npmcli/move-file@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@npmcli/move-file/-/move-file-1.0.1.tgz#de103070dac0f48ce49cf6693c23af59c0f70464" + integrity sha512-Uv6h1sT+0DrblvIrolFtbvM1FgWm+/sy4B3pvLp67Zys+thcukzS5ekn7HsZFGpWP4Q3fYJCljbWQE/XivMRLw== + dependencies: + mkdirp "^1.0.4" + "@octokit/auth-token@^2.4.0": version "2.4.0" resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-2.4.0.tgz#b64178975218b99e4dfe948253f0673cbbb59d9f" @@ -2320,6 +2327,11 @@ resolved "https://registry.yarnpkg.com/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#1ee30d79544ca84d68d4b3cdb0af4f205663dd2d" integrity sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag== +"@types/estree@0.0.42": + version "0.0.42" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.42.tgz#8d0c1f480339efedb3e46070e22dd63e0430dd11" + integrity sha512-K1DPVvnBCPxzD+G51/cxVIoc2X8uUVl1zpJeE6iKcgHMj4+tbat5Xu4TjV7v2QSDbIeAfLi2hIk+u2+s0MlpUQ== + "@types/events@*": version "3.0.0" resolved "https://registry.yarnpkg.com/@types/events/-/events-3.0.0.tgz#2862f3f58a9a7f7c3e78d79f130dd4d71c25c2a7" @@ -2396,6 +2408,11 @@ resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.4.tgz#38fd73ddfd9b55abb1e1b2ed578cb55bd7b7d339" integrity sha512-8+KAKzEvSUdeo+kmqnKrqgeE+LcA0tjYWFY7RPProVYwnqDjukzO+3b6dLD56rYX5TdWejnEOLJYOIeh4CXKuA== +"@types/json-schema@^7.0.4": + version "7.0.5" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.5.tgz#dcce4430e64b443ba8945f0290fb564ad5bac6dd" + integrity sha512-7+2BITlgjgDhH0vvwZU/HZJVyk+2XUlvxXe8dFMedNX/aMkaOq++rMAFXc0tM7ij15QaWlbdQASBR9dihi+bDQ== + "@types/keyv@*", "@types/keyv@^3.1.1": version "3.1.1" resolved "https://registry.yarnpkg.com/@types/keyv/-/keyv-3.1.1.tgz#e45a45324fca9dab716ab1230ee249c9fb52cfa7" @@ -2777,7 +2794,7 @@ acorn@^6.0.1, acorn@^6.4.1: resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.1.tgz#531e58ba3f51b9dacb9a6646ca4debf5b14ca474" integrity sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA== -acorn@^7.1.0, acorn@^7.1.1: +acorn@^7.0.0, acorn@^7.1.0, acorn@^7.1.1: version "7.1.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.1.1.tgz#e35668de0b402f359de515c5482a1ab9f89a69bf" integrity sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg== @@ -2821,7 +2838,7 @@ ajv-keywords@^3.1.0, ajv-keywords@^3.4.1: resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.4.1.tgz#ef916e271c64ac12171fd8384eaae6b2345854da" integrity sha512-RO1ibKvd27e6FEShVFfPALuHI3WjSVNeK5FIsmme/LYRNxjKuNj+Dt7bucLa6NdSv3JcVTyMlm9kGR84z1XpaQ== -ajv@^6.1.0, ajv@^6.10.0, ajv@^6.10.2, ajv@^6.5.5: +ajv@^6.1.0, ajv@^6.10.0, ajv@^6.10.2, ajv@^6.12.0, ajv@^6.5.5: version "6.12.0" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.0.tgz#06d60b96d87b8454a5adaba86e7854da629db4b7" integrity sha512-D6gFiFA0RRLyUbvijN74DWAjXSFxWKaWP7mldxkVhyhAV3+SWA9HEJPHQ2c9soIeTFJqcSdFDGFgdqs1iUU2Hw== @@ -3540,6 +3557,29 @@ cacache@^12.0.0, cacache@^12.0.2, cacache@^12.0.3: unique-filename "^1.1.1" y18n "^4.0.0" +cacache@^15.0.4: + version "15.0.4" + resolved "https://registry.yarnpkg.com/cacache/-/cacache-15.0.4.tgz#b2c23cf4ac4f5ead004fb15a0efb0a20340741f1" + integrity sha512-YlnKQqTbD/6iyoJvEY3KJftjrdBYroCbxxYXzhOzsFLWlp6KX4BOlEf4mTx0cMUfVaTS3ENL2QtDWeRYoGLkkw== + dependencies: + "@npmcli/move-file" "^1.0.1" + chownr "^2.0.0" + fs-minipass "^2.0.0" + glob "^7.1.4" + infer-owner "^1.0.4" + lru-cache "^5.1.1" + minipass "^3.1.1" + minipass-collect "^1.0.2" + minipass-flush "^1.0.5" + minipass-pipeline "^1.2.2" + mkdirp "^1.0.3" + p-map "^4.0.0" + promise-inflight "^1.0.1" + rimraf "^3.0.2" + ssri "^8.0.0" + tar "^6.0.2" + unique-filename "^1.1.1" + cache-base@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" @@ -3748,6 +3788,11 @@ chownr@^1.1.1, chownr@^1.1.2: resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== +chownr@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece" + integrity sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ== + chrome-trace-event@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.2.tgz#234090ee97c7d4ad1a2c4beae27505deffc608a4" @@ -4884,6 +4929,14 @@ end-of-stream@^1.0.0, end-of-stream@^1.1.0: dependencies: once "^1.4.0" +enhanced-resolve@5.0.0-beta.7: + version "5.0.0-beta.7" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.0.0-beta.7.tgz#174f085396ac8edc734253f5b6aa9a05cb0d73b2" + integrity sha512-4r9mhIEedx7IsNgutSPyFtD0hKukbknr8Fuee36IXg9dYcAeDLb7l6LzBAeiDBgUKeFv+OgMSkCyp/SGCZ5Xag== + dependencies: + graceful-fs "^4.2.0" + tapable "^2.0.0-beta.10" + enhanced-resolve@^4.1.0: version "4.1.1" resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-4.1.1.tgz#2937e2b8066cd0fe7ce0990a98f0d71a35189f66" @@ -5516,6 +5569,15 @@ find-cache-dir@^2.0.0, find-cache-dir@^2.1.0: make-dir "^2.0.0" pkg-dir "^3.0.0" +find-cache-dir@^3.3.1: + version "3.3.1" + resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-3.3.1.tgz#89b33fad4a4670daa94f855f7fbe31d6d84fe880" + integrity sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ== + dependencies: + commondir "^1.0.1" + make-dir "^3.0.2" + pkg-dir "^4.1.0" + find-config@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/find-config/-/find-config-1.0.0.tgz#eafa2b9bc07fa9c90e9a0c3ef9cecf1cc800f530" @@ -5680,6 +5742,13 @@ fs-minipass@^1.2.5: dependencies: minipass "^2.6.0" +fs-minipass@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-2.1.0.tgz#7f5036fdbf12c63c169190cbe4199c852271f9fb" + integrity sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg== + dependencies: + minipass "^3.0.0" + fs-write-stream-atomic@^1.0.8: version "1.0.10" resolved "https://registry.yarnpkg.com/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz#b47df53493ef911df75731e70a9ded0189db40c9" @@ -5929,6 +5998,11 @@ glob-to-regexp@^0.3.0: resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab" integrity sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs= +glob-to-regexp@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" + integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== + glob@^7.0.0, glob@^7.0.3, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: version "7.1.6" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" @@ -7521,6 +7595,14 @@ jest-worker@^25.5.0: merge-stream "^2.0.0" supports-color "^7.0.0" +jest-worker@^26.0.0: + version "26.1.0" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-26.1.0.tgz#65d5641af74e08ccd561c240e7db61284f82f33d" + integrity sha512-Z9P5pZ6UC+kakMbNJn+tA2RdVdNX5WH1x+5UCBZ9MxIK24pjYtFt96fK+UwBTrjLYm232g1xz0L3eTh51OW+yQ== + dependencies: + merge-stream "^2.0.0" + supports-color "^7.0.0" + jest@^25.2.3: version "25.5.4" resolved "https://registry.yarnpkg.com/jest/-/jest-25.5.4.tgz#f21107b6489cfe32b076ce2adcadee3587acb9db" @@ -7903,6 +7985,11 @@ loader-runner@^2.4.0: resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.4.0.tgz#ed47066bfe534d7e84c4c7b9998c2a75607d9357" integrity sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw== +loader-runner@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-3.1.0.tgz#e9440e5875f2ad2f968489cd2c7b59a4f2847fcb" + integrity sha512-wE/bOCdTKMR2rm7Xxh+eirDOmN7Vx7hntWgiTayuFPtF8MgsFDo49SP8kkYz8IVlEBTOtR7P+XI7bE1xjo/IkA== + loader-utils@^1.2.3: version "1.4.0" resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.4.0.tgz#c579b5e34cb34b1a74edc6c1fb36bfa371d5a613" @@ -8111,7 +8198,7 @@ make-dir@^2.0.0, make-dir@^2.1.0: pify "^4.0.1" semver "^5.6.0" -make-dir@^3.0.0: +make-dir@^3.0.0, make-dir@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.0.2.tgz#04a1acbf22221e1d6ef43559f43e05a90dbb4392" integrity sha512-rYKABKutXa6vXTXhoV18cBE7PaewPXHe/Bdq4v+ZLMhxbWApkFFplT0LcbMW+6BbjnQXzZ/sAvSE/JdguApG5w== @@ -8369,7 +8456,7 @@ mime-db@1.43.0, "mime-db@>= 1.43.0 < 2": resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.43.0.tgz#0a12e0502650e473d735535050e7c8f4eb4fae58" integrity sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ== -mime-types@^2.1.12, mime-types@~2.1.17, mime-types@~2.1.19, mime-types@~2.1.24: +mime-types@^2.1.12, mime-types@^2.1.26, mime-types@~2.1.17, mime-types@~2.1.19, mime-types@~2.1.24: version "2.1.26" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.26.tgz#9c921fc09b7e149a65dfdc0da4d20997200b0a06" integrity sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ== @@ -8455,6 +8542,27 @@ minimist@~0.0.1: resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" integrity sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8= +minipass-collect@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/minipass-collect/-/minipass-collect-1.0.2.tgz#22b813bf745dc6edba2576b940022ad6edc8c617" + integrity sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA== + dependencies: + minipass "^3.0.0" + +minipass-flush@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/minipass-flush/-/minipass-flush-1.0.5.tgz#82e7135d7e89a50ffe64610a787953c4c4cbb373" + integrity sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw== + dependencies: + minipass "^3.0.0" + +minipass-pipeline@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/minipass-pipeline/-/minipass-pipeline-1.2.2.tgz#3dcb6bb4a546e32969c7ad710f2c79a86abba93a" + integrity sha512-3JS5A2DKhD2g0Gg8x3yamO0pj7YeKGwVlDS90pF++kxptwx/F+B//roxf9SqYil5tQo65bijy+dAuAFZmYOouA== + dependencies: + minipass "^3.0.0" + minipass@^2.3.5, minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0: version "2.9.0" resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6" @@ -8463,6 +8571,13 @@ minipass@^2.3.5, minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0: safe-buffer "^5.1.2" yallist "^3.0.0" +minipass@^3.0.0, minipass@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.1.1.tgz#7607ce778472a185ad6d89082aa2070f79cedcd5" + integrity sha512-UFqVihv6PQgwj8/yTGvl9kPz7xIAY+R5z6XYjRInD3Gk3qx6QGSD6zEcpeG4Dy/lQnv1J6zv8ejV90hyYIKf3w== + dependencies: + yallist "^4.0.0" + minizlib@^1.2.1: version "1.3.3" resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d" @@ -8470,6 +8585,14 @@ minizlib@^1.2.1: dependencies: minipass "^2.9.0" +minizlib@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.0.tgz#fd52c645301ef09a63a2c209697c294c6ce02cf3" + integrity sha512-EzTZN/fjSvifSX0SlqUERCN39o6T40AMarPbv0MrarSFtIITCBh7bi+dU8nxGFHuqs9jdIAeoYoKuQAAASsPPA== + dependencies: + minipass "^3.0.0" + yallist "^4.0.0" + mississippi@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/mississippi/-/mississippi-3.0.0.tgz#ea0a3291f97e0b5e8776b363d5f0a12d94c67022" @@ -8513,6 +8636,11 @@ mkdirp@0.x, mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@^0.5.3: dependencies: minimist "^1.2.5" +mkdirp@^1.0.3, mkdirp@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" + integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== + modify-values@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/modify-values/-/modify-values-1.0.1.tgz#b3939fa605546474e3e3e3c63d64bd43b4ee6022" @@ -9122,6 +9250,13 @@ p-limit@^2.0.0, p-limit@^2.2.0: dependencies: p-try "^2.0.0" +p-limit@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.0.1.tgz#584784ac0722d1aed09f19f90ed2999af6ce2839" + integrity sha512-mw/p92EyOzl2MhauKodw54Rx5ZK4624rNfgNaBguFZkHzyUG9WsDzFF5/yQVEJinbJDdP4jEfMN+uBquiGnaLg== + dependencies: + p-try "^2.0.0" + p-locate@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" @@ -9465,7 +9600,7 @@ pkg-dir@^3.0.0: dependencies: find-up "^3.0.0" -pkg-dir@^4.2.0: +pkg-dir@^4.1.0, pkg-dir@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== @@ -9750,7 +9885,7 @@ quick-lru@^4.0.1: resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-4.0.1.tgz#5b8878f113a58217848c6482026c73e1ba57727f" integrity sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g== -randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5: +randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5, randombytes@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== @@ -10405,6 +10540,23 @@ schema-utils@^1.0.0: ajv-errors "^1.0.0" ajv-keywords "^3.1.0" +schema-utils@^2.5.0: + version "2.6.5" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.6.5.tgz#c758f0a7e624263073d396e29cd40aa101152d8a" + integrity sha512-5KXuwKziQrTVHh8j/Uxz+QUbxkaLW9X/86NBlx/gnKgtsZA2GIVMUn17qWhRFwF8jdYb3Dig5hRO/W5mZqy6SQ== + dependencies: + ajv "^6.12.0" + ajv-keywords "^3.4.1" + +schema-utils@^2.6.6: + version "2.7.0" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.7.0.tgz#17151f76d8eae67fbbf77960c33c676ad9f4efc7" + integrity sha512-0ilKFI6QQF5nxDZLFn2dMjvc4hjg/Wkg7rHd3jK6/A4a1Hl9VFdQWvgB1UMGoU94pad1P/8N7fMcEnLnSiju8A== + dependencies: + "@types/json-schema" "^7.0.4" + ajv "^6.12.2" + ajv-keywords "^3.4.1" + scoped-regex@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/scoped-regex/-/scoped-regex-1.0.0.tgz#a346bb1acd4207ae70bd7c0c7ca9e566b6baddb8" @@ -10476,6 +10628,13 @@ serialize-javascript@^2.1.2: resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-2.1.2.tgz#ecec53b0e0317bdc95ef76ab7074b7384785fa61" integrity sha512-rs9OggEUF0V4jUSecXazOYsLfu7OGK2qIn3c7IPBiffz32XniEp/TX9Xmc9LQfK2nQ2QKHvZ2oygKUGU0lG4jQ== +serialize-javascript@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-4.0.0.tgz#b525e1238489a5ecfc42afacc3fe99e666f4b1aa" + integrity sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw== + dependencies: + randombytes "^2.1.0" + serve-index@^1.9.1: version "1.9.1" resolved "https://registry.yarnpkg.com/serve-index/-/serve-index-1.9.1.tgz#d3768d69b1e7d82e5ce050fff5b453bea12a9239" @@ -10735,7 +10894,7 @@ sort-keys@^2.0.0: dependencies: is-plain-obj "^1.0.0" -source-list-map@^2.0.0: +source-list-map@^2.0.0, source-list-map@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34" integrity sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw== @@ -10876,6 +11035,13 @@ ssri@^6.0.0, ssri@^6.0.1: dependencies: figgy-pudding "^3.5.1" +ssri@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/ssri/-/ssri-8.0.0.tgz#79ca74e21f8ceaeddfcb4b90143c458b8d988808" + integrity sha512-aq/pz989nxVYwn16Tsbj1TqFpD5LLrQxHf5zaHuieFV+R0Bbr4y8qUsOA45hXT/N4/9UNXTarBjnjVmjSOVaAA== + dependencies: + minipass "^3.1.1" + stack-utils@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-1.0.2.tgz#33eba3897788558bebfc2db059dc158ec36cebb8" @@ -11196,6 +11362,11 @@ tapable@^1.0.0, tapable@^1.1.3: resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA== +tapable@^2.0.0-beta.10: + version "2.0.0-beta.11" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.0.0-beta.11.tgz#5a6bd5e0353fad4da9e94942206bb596639e8cf7" + integrity sha512-cAhRzCvMdyJsxmdrSXG8/SUlJG4WJUxD/csuYAybUFjKVt74Y6pTyZ/I1ZK+enmCkWZN0JWxh14G69temaGSiA== + tar@^4.4.10, tar@^4.4.12, tar@^4.4.8: version "4.4.13" resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.13.tgz#43b364bc52888d555298637b10d60790254ab525" @@ -11209,6 +11380,18 @@ tar@^4.4.10, tar@^4.4.12, tar@^4.4.8: safe-buffer "^5.1.2" yallist "^3.0.3" +tar@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/tar/-/tar-6.0.2.tgz#5df17813468a6264ff14f766886c622b84ae2f39" + integrity sha512-Glo3jkRtPcvpDlAs/0+hozav78yoXKFr+c4wgw62NNMO3oo4AaJdCo21Uu7lcwr55h39W2XD1LMERc64wtbItg== + dependencies: + chownr "^2.0.0" + fs-minipass "^2.0.0" + minipass "^3.0.0" + minizlib "^2.1.0" + mkdirp "^1.0.3" + yallist "^4.0.0" + temp-dir@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/temp-dir/-/temp-dir-1.0.0.tgz#0a7c0ea26d3a39afa7e0ebea9c1fc0bc4daa011d" @@ -11263,6 +11446,21 @@ terser-webpack-plugin@^1.4.3: webpack-sources "^1.4.0" worker-farm "^1.7.0" +terser-webpack-plugin@^3.0.2: + version "3.0.6" + resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-3.0.6.tgz#db0a108bbdd3680d72c9b491fbabad09ba207b99" + integrity sha512-z3HLOOPUHkCNGkeEHqqiMAIy1pjpHwS1o+i6Zn0Ws3EAvHJj46737efNNEvJ0Vx9BdDQM83d56qySDJOSORA0A== + dependencies: + cacache "^15.0.4" + find-cache-dir "^3.3.1" + jest-worker "^26.0.0" + p-limit "^3.0.1" + schema-utils "^2.6.6" + serialize-javascript "^4.0.0" + source-map "^0.6.1" + terser "^4.8.0" + webpack-sources "^1.4.3" + terser@^4.1.2: version "4.6.7" resolved "https://registry.yarnpkg.com/terser/-/terser-4.6.7.tgz#478d7f9394ec1907f0e488c5f6a6a9a2bad55e72" @@ -11272,6 +11470,15 @@ terser@^4.1.2: source-map "~0.6.1" source-map-support "~0.5.12" +terser@^4.8.0: + version "4.8.0" + resolved "https://registry.yarnpkg.com/terser/-/terser-4.8.0.tgz#63056343d7c70bb29f3af665865a46fe03a0df17" + integrity sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw== + dependencies: + commander "^2.20.0" + source-map "~0.6.1" + source-map-support "~0.5.12" + test-exclude@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" @@ -11883,6 +12090,14 @@ watchpack-chokidar2@^2.0.0: dependencies: chokidar "^2.1.8" +watchpack@2.0.0-beta.13: + version "2.0.0-beta.13" + resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.0.0-beta.13.tgz#9d9b0c094b8402139333e04eb6194643c8384f55" + integrity sha512-ZEFq2mx/k5qgQwgi6NOm+2ImICb8ngAkA/rZ6oyXZ7SgPn3pncf+nfhYTCrs3lmHwOxnPtGLTOuFLfpSMh1VMA== + dependencies: + glob-to-regexp "^0.4.1" + graceful-fs "^4.1.2" + watchpack@^1.6.1: version "1.7.2" resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.7.2.tgz#c02e4d4d49913c3e7e122c3325365af9d331e9aa" @@ -11978,7 +12193,15 @@ webpack-merge@^4.2.2: dependencies: lodash "^4.17.15" -webpack-sources@^1.4.0, webpack-sources@^1.4.1: +webpack-sources@2.0.0-beta.8: + version "2.0.0-beta.8" + resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-2.0.0-beta.8.tgz#0fc292239f6767cf4e9b47becfaa340ce6d7ea4f" + integrity sha512-RUaCJu7HYNeuzlY4WYcArcnOzMIj7kHndQ4pBdgP3iiMpG3Ke0BWY5wvb/VEFgsIXp3ZzPGRECwX+4fgpcKFYw== + dependencies: + source-list-map "^2.0.1" + source-map "~0.6.1" + +webpack-sources@^1.4.0, webpack-sources@^1.4.1, webpack-sources@^1.4.3: version "1.4.3" resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.4.3.tgz#eedd8ec0b928fbf1cbfe994e22d2d890f330a933" integrity sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ== @@ -11986,7 +12209,7 @@ webpack-sources@^1.4.0, webpack-sources@^1.4.1: source-list-map "^2.0.0" source-map "~0.6.1" -webpack@4.x.x, webpack@^4.43.0: +webpack@4.x.x: version "4.43.0" resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.43.0.tgz#c48547b11d563224c561dad1172c8aa0b8a678e6" integrity sha512-GW1LjnPipFW2Y78OOab8NJlCflB7EFskMih2AHdvjbpKMeDJqEgSx24cXXXiPS65+WSwVyxtDsJH6jGX2czy+g== @@ -12015,6 +12238,34 @@ webpack@4.x.x, webpack@^4.43.0: watchpack "^1.6.1" webpack-sources "^1.4.1" +webpack@^5.0.0-beta.20: + version "5.0.0-beta.20" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.0.0-beta.20.tgz#a4798bbbe5bd27651f85f401f7b05ebc94a9399a" + integrity sha512-bIUAephArRkyWBzhLJ7OD5ys+jTNgANuJJy4+qhAWd5De4T0l/qKrVYdXZCbAj3PXUdxyEL5KsJHPQHacyfBGQ== + dependencies: + "@types/estree" "0.0.42" + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/helper-module-context" "1.9.0" + "@webassemblyjs/wasm-edit" "1.9.0" + "@webassemblyjs/wasm-parser" "1.9.0" + acorn "^7.0.0" + chrome-trace-event "^1.0.2" + enhanced-resolve "5.0.0-beta.7" + eslint-scope "^5.0.0" + events "^3.0.0" + glob-to-regexp "^0.4.1" + graceful-fs "^4.1.15" + json-parse-better-errors "^1.0.2" + loader-runner "^3.1.0" + mime-types "^2.1.26" + neo-async "^2.6.1" + pkg-dir "^4.2.0" + schema-utils "^2.5.0" + tapable "^2.0.0-beta.10" + terser-webpack-plugin "^3.0.2" + watchpack "2.0.0-beta.13" + webpack-sources "2.0.0-beta.8" + websocket-driver@>=0.5.1: version "0.7.3" resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.3.tgz#a2d4e0d4f4f116f1e6297eba58b05d430100e9f9" @@ -12261,6 +12512,11 @@ yallist@^3.0.0, yallist@^3.0.2, yallist@^3.0.3: resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== + yaml@^1.7.2: version "1.8.3" resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.8.3.tgz#2f420fca58b68ce3a332d0ca64be1d191dd3f87a" From 2943162167c553164ad9a3d24e8cb81435f02cfd Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Tue, 14 Jul 2020 18:33:58 +0530 Subject: [PATCH 02/21] fix: lint --- test/utils/test-utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/utils/test-utils.js b/test/utils/test-utils.js index 4c207fc692d..80faa787a27 100644 --- a/test/utils/test-utils.js +++ b/test/utils/test-utils.js @@ -251,7 +251,7 @@ const runServe = (args, testPath) => { const runInfo = (args, testPath) => { return run(testPath, ['info'].concat(args), false); }; - + const hyphenToUpperCase = (name) => { if (!name) { return name; From dec1c2ac9856023ad14d5a8620db2a22f607c5df Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Tue, 14 Jul 2020 18:34:38 +0530 Subject: [PATCH 03/21] fix: watch-options-poll --- packages/webpack-cli/lib/utils/cli-flags.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/webpack-cli/lib/utils/cli-flags.js b/packages/webpack-cli/lib/utils/cli-flags.js index 20a80025b0c..0cd3e46a995 100644 --- a/packages/webpack-cli/lib/utils/cli-flags.js +++ b/packages/webpack-cli/lib/utils/cli-flags.js @@ -35,7 +35,7 @@ let flagsFromCore = // duplicate flags const duplicateFlags = ['entry', 'mode', 'stats', 'watch', 'target']; // broken flags -const brokenFlags = ['module-no-parse', 'module-no-parse-reset', 'optimization-no-emit-on-errors', 'watch-options-poll']; +const brokenFlags = ['module-no-parse', 'module-no-parse-reset', 'optimization-no-emit-on-errors']; // regExp Flags const regExpFlags = ['module-expr-context-reg-exp', 'module-unknown-context-reg-exp', 'module-wrapped-context-reg-exp']; // inFeasibleFlags https://github.com/webpack/webpack-cli/pull/1630#issuecomment-646992322 From b13fa3102a73591c68c6b2fa28062ee8e9ed3b0c Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Tue, 14 Jul 2020 18:39:18 +0530 Subject: [PATCH 04/21] tests: watch-options-poll --- test/core-flags/watch-flags.test.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/test/core-flags/watch-flags.test.js b/test/core-flags/watch-flags.test.js index 871c8e54af7..ff8208ee2e4 100644 --- a/test/core-flags/watch-flags.test.js +++ b/test/core-flags/watch-flags.test.js @@ -46,9 +46,14 @@ describe('watch config related flag', () => { if (flag.type === String) { it(`should config --${flag.name} correctly`, () => { - const { stderr, stdout } = run(__dirname, [`--${flag.name}`, 'ignore.js']); + let { stderr, stdout } = run(__dirname, [`--${flag.name}`, 'ignore.js']); expect(stderr).toBeFalsy(); - expect(stdout).toContain(`watchOptions: { ${propName}: [ 'ignore.js' ] }`); + if (propName === 'poll') { + stdout = run(__dirname, [`--${flag.name}`, '10']).stdout; + expect(stdout).toContain(`watchOptions: { ${propName}: 10 }`); + } else { + expect(stdout).toContain(`watchOptions: { ${propName}: [ 'ignore.js' ] }`); + } }); } }); From 08c56c1f04811a68cbbdb66e52c834984fcd21f3 Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Thu, 16 Jul 2020 13:56:41 +0530 Subject: [PATCH 05/21] tests: module & resolve flgas --- packages/webpack-cli/lib/utils/cli-flags.js | 6 +----- test/core-flags/module-flags.test.js | 6 ++++-- test/core-flags/resolve-flags.test.js | 4 ++-- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/packages/webpack-cli/lib/utils/cli-flags.js b/packages/webpack-cli/lib/utils/cli-flags.js index 0cd3e46a995..dc4ad0a2e32 100644 --- a/packages/webpack-cli/lib/utils/cli-flags.js +++ b/packages/webpack-cli/lib/utils/cli-flags.js @@ -38,13 +38,9 @@ const duplicateFlags = ['entry', 'mode', 'stats', 'watch', 'target']; const brokenFlags = ['module-no-parse', 'module-no-parse-reset', 'optimization-no-emit-on-errors']; // regExp Flags const regExpFlags = ['module-expr-context-reg-exp', 'module-unknown-context-reg-exp', 'module-wrapped-context-reg-exp']; -// inFeasibleFlags https://github.com/webpack/webpack-cli/pull/1630#issuecomment-646992322 -const inFeasibleFlags = flagsFromCore.filter(({ name }) => { - return name.includes('module-rules-') || name.includes('alias-') || name.startsWith('output-library'); -}); // filter all duplicate, broken and regExp flags const flagsToFilter = [...duplicateFlags, ...brokenFlags, ...regExpFlags]; -flagsFromCore = flagsFromCore.filter((flag) => !flagsToFilter.includes(flag.name) && !inFeasibleFlags.includes(flag)); +flagsFromCore = flagsFromCore.filter((flag) => !flagsToFilter.includes(flag.name)); module.exports = { groups: { diff --git a/test/core-flags/module-flags.test.js b/test/core-flags/module-flags.test.js index caa20d03081..b675ca70fe3 100644 --- a/test/core-flags/module-flags.test.js +++ b/test/core-flags/module-flags.test.js @@ -11,7 +11,9 @@ describe('module config related flag', () => { const property = flag.name.split('module-')[1]; const propName = hyphenToUpperCase(property); - if (flag.type === Boolean) { + //TODO: improve webpackCLITestPlugin for testing of nested options + // i.e, module-rules-* flags, right now it logs rules: [Object] only. + if (flag.type === Boolean && !flag.name.includes('rules-')) { it(`should config --${flag.name} correctly`, () => { const { stderr, stdout } = run(__dirname, [`--${flag.name}`]); expect(stderr).toBeFalsy(); @@ -35,7 +37,7 @@ describe('module config related flag', () => { }); } - if (flag.type === String) { + if (flag.type === String && !flag.name.includes('rules-')) { it(`should config --${flag.name} correctly`, () => { const { stderr, stdout } = run(__dirname, [`--${flag.name}`, 'value']); expect(stderr).toBeFalsy(); diff --git a/test/core-flags/resolve-flags.test.js b/test/core-flags/resolve-flags.test.js index 85c5bfdb1ca..b5412d87081 100644 --- a/test/core-flags/resolve-flags.test.js +++ b/test/core-flags/resolve-flags.test.js @@ -14,7 +14,7 @@ describe('resolve config related flag', () => { } const propName = hyphenToUpperCase(property); - if (flag.type === Boolean) { + if (flag.type === Boolean && !flag.name.includes('alias-')) { it(`should config --${flag.name} correctly`, () => { const { stderr, stdout } = run(__dirname, [`--${flag.name}`]); @@ -28,7 +28,7 @@ describe('resolve config related flag', () => { }); } - if (flag.type === String) { + if (flag.type === String && !flag.name.includes('alias-')) { it(`should config --${flag.name} correctly`, () => { const { stderr, stdout } = run(__dirname, [`--${flag.name}`, 'browser']); expect(stderr).toBeFalsy(); From 92c6934684e341af5f2a624e0cba04af45f6ce86 Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Thu, 16 Jul 2020 14:01:09 +0530 Subject: [PATCH 06/21] tests: output-flags --- test/core-flags/output-flags.test.js | 4 ++-- test/core-flags/resolve-flags.test.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/core-flags/output-flags.test.js b/test/core-flags/output-flags.test.js index 1bea6ec7308..2f407d9d4a1 100644 --- a/test/core-flags/output-flags.test.js +++ b/test/core-flags/output-flags.test.js @@ -3,9 +3,9 @@ const { run, hyphenToUpperCase } = require('../utils/test-utils'); const { flagsFromCore } = require('../../packages/webpack-cli/lib/utils/cli-flags'); -const outputFlags = flagsFromCore.filter(({ name }) => name.startsWith('output-')); +const outputFlags = flagsFromCore.filter(({ name }) => name.startsWith('output-') && !name.includes('output-library')); -describe('module config related flag', () => { +describe('output config related flag', () => { outputFlags.forEach((flag) => { // extract property name from flag name const property = flag.name.split('output-')[1]; diff --git a/test/core-flags/resolve-flags.test.js b/test/core-flags/resolve-flags.test.js index b5412d87081..dad72dac514 100644 --- a/test/core-flags/resolve-flags.test.js +++ b/test/core-flags/resolve-flags.test.js @@ -5,7 +5,7 @@ const { flagsFromCore } = require('../../packages/webpack-cli/lib/utils/cli-flag const resolveFlags = flagsFromCore.filter(({ name }) => name.startsWith('resolve')); -describe('resolve config related flag', () => { +describe('resolve config related flags', () => { resolveFlags.forEach((flag) => { // extract property name from flag name let property = flag.name.split('resolve-')[1]; From daab6b873eefab5d3784aa628855e31432fc52e7 Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Sun, 19 Jul 2020 18:52:56 +0530 Subject: [PATCH 07/21] tests: output-library-* --- test/core-flags/output-flags.test.js | 36 +++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/test/core-flags/output-flags.test.js b/test/core-flags/output-flags.test.js index 2f407d9d4a1..03cb6eca03f 100644 --- a/test/core-flags/output-flags.test.js +++ b/test/core-flags/output-flags.test.js @@ -3,7 +3,7 @@ const { run, hyphenToUpperCase } = require('../utils/test-utils'); const { flagsFromCore } = require('../../packages/webpack-cli/lib/utils/cli-flags'); -const outputFlags = flagsFromCore.filter(({ name }) => name.startsWith('output-') && !name.includes('output-library')); +const outputFlags = flagsFromCore.filter(({ name }) => name.startsWith('output-')); describe('output config related flag', () => { outputFlags.forEach((flag) => { @@ -11,7 +11,7 @@ describe('output config related flag', () => { const property = flag.name.split('output-')[1]; const propName = hyphenToUpperCase(property); - if (flag.type === Boolean) { + if (flag.type === Boolean && !flag.name.includes('output-library')) { it(`should config --${flag.name} correctly`, () => { let { stderr, stdout } = run(__dirname, [`--${flag.name}`]); @@ -52,7 +52,7 @@ describe('output config related flag', () => { }); } - if (flag.type === String) { + if (flag.type === String && !flag.name.includes('output-library')) { it(`should config --${flag.name} correctly`, () => { let { stderr, stdout } = run(__dirname, [`--${flag.name}`, 'test']); @@ -90,5 +90,35 @@ describe('output config related flag', () => { } }); } + + if (flag.name.includes('output-library')) { + it(`should config name, type and export correctly`, () => { + const { stderr, stdout } = run(__dirname, [ + '--output-library-name', + 'myLibrary', + '--output-library-type', + 'var', + '--output-library-export', + 'myExport', + '--output-library-auxiliary-comment', + 'comment', + '--output-library-umd-named-define', + ]); + + expect(stderr).toBeFalsy(); + expect(stdout).toContain('myLibrary'); + expect(stdout).toContain(`type: 'var'`); + expect(stdout).toContain('export: [Array]'); + expect(stdout).toContain(`auxiliaryComment: 'comment'`); + expect(stdout).toContain('umdNamedDefine: true'); + }); + + it('should be succesful with --output-library-reset correctly', () => { + const { stderr, stdout } = run(__dirname, ['--output-library-reset']); + + expect(stderr).toBeFalsy(); + expect(stdout).toContain('name: []'); + }); + } }); }); From 4caddcd495264926649ca90832aafc45cf07796d Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Sun, 19 Jul 2020 19:00:38 +0530 Subject: [PATCH 08/21] chore: use webpack v4 in package.json --- package.json | 2 +- yarn.lock | 274 ++------------------------------------------------- 2 files changed, 10 insertions(+), 266 deletions(-) diff --git a/package.json b/package.json index ee48835e8df..4a1ae575e3a 100644 --- a/package.json +++ b/package.json @@ -126,7 +126,7 @@ "rimraf": "^3.0.2", "ts-jest": "^25.3.0", "typescript": "^3.9.5", - "webpack": "^5.0.0-beta.20", + "webpack": "^4.43.0", "yeoman-test": "^2.3.0" } } diff --git a/yarn.lock b/yarn.lock index acb7850b610..cedd97d2d96 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2105,13 +2105,6 @@ "@nodelib/fs.scandir" "2.1.3" fastq "^1.6.0" -"@npmcli/move-file@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@npmcli/move-file/-/move-file-1.0.1.tgz#de103070dac0f48ce49cf6693c23af59c0f70464" - integrity sha512-Uv6h1sT+0DrblvIrolFtbvM1FgWm+/sy4B3pvLp67Zys+thcukzS5ekn7HsZFGpWP4Q3fYJCljbWQE/XivMRLw== - dependencies: - mkdirp "^1.0.4" - "@octokit/auth-token@^2.4.0": version "2.4.0" resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-2.4.0.tgz#b64178975218b99e4dfe948253f0673cbbb59d9f" @@ -2327,11 +2320,6 @@ resolved "https://registry.yarnpkg.com/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#1ee30d79544ca84d68d4b3cdb0af4f205663dd2d" integrity sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag== -"@types/estree@0.0.42": - version "0.0.42" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.42.tgz#8d0c1f480339efedb3e46070e22dd63e0430dd11" - integrity sha512-K1DPVvnBCPxzD+G51/cxVIoc2X8uUVl1zpJeE6iKcgHMj4+tbat5Xu4TjV7v2QSDbIeAfLi2hIk+u2+s0MlpUQ== - "@types/events@*": version "3.0.0" resolved "https://registry.yarnpkg.com/@types/events/-/events-3.0.0.tgz#2862f3f58a9a7f7c3e78d79f130dd4d71c25c2a7" @@ -2408,11 +2396,6 @@ resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.4.tgz#38fd73ddfd9b55abb1e1b2ed578cb55bd7b7d339" integrity sha512-8+KAKzEvSUdeo+kmqnKrqgeE+LcA0tjYWFY7RPProVYwnqDjukzO+3b6dLD56rYX5TdWejnEOLJYOIeh4CXKuA== -"@types/json-schema@^7.0.4": - version "7.0.5" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.5.tgz#dcce4430e64b443ba8945f0290fb564ad5bac6dd" - integrity sha512-7+2BITlgjgDhH0vvwZU/HZJVyk+2XUlvxXe8dFMedNX/aMkaOq++rMAFXc0tM7ij15QaWlbdQASBR9dihi+bDQ== - "@types/keyv@*", "@types/keyv@^3.1.1": version "3.1.1" resolved "https://registry.yarnpkg.com/@types/keyv/-/keyv-3.1.1.tgz#e45a45324fca9dab716ab1230ee249c9fb52cfa7" @@ -2794,7 +2777,7 @@ acorn@^6.0.1, acorn@^6.4.1: resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.1.tgz#531e58ba3f51b9dacb9a6646ca4debf5b14ca474" integrity sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA== -acorn@^7.0.0, acorn@^7.1.0, acorn@^7.1.1: +acorn@^7.1.0, acorn@^7.1.1: version "7.1.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.1.1.tgz#e35668de0b402f359de515c5482a1ab9f89a69bf" integrity sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg== @@ -2838,7 +2821,7 @@ ajv-keywords@^3.1.0, ajv-keywords@^3.4.1: resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.4.1.tgz#ef916e271c64ac12171fd8384eaae6b2345854da" integrity sha512-RO1ibKvd27e6FEShVFfPALuHI3WjSVNeK5FIsmme/LYRNxjKuNj+Dt7bucLa6NdSv3JcVTyMlm9kGR84z1XpaQ== -ajv@^6.1.0, ajv@^6.10.0, ajv@^6.10.2, ajv@^6.12.0, ajv@^6.5.5: +ajv@^6.1.0, ajv@^6.10.0, ajv@^6.10.2, ajv@^6.5.5: version "6.12.0" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.0.tgz#06d60b96d87b8454a5adaba86e7854da629db4b7" integrity sha512-D6gFiFA0RRLyUbvijN74DWAjXSFxWKaWP7mldxkVhyhAV3+SWA9HEJPHQ2c9soIeTFJqcSdFDGFgdqs1iUU2Hw== @@ -3557,29 +3540,6 @@ cacache@^12.0.0, cacache@^12.0.2, cacache@^12.0.3: unique-filename "^1.1.1" y18n "^4.0.0" -cacache@^15.0.4: - version "15.0.4" - resolved "https://registry.yarnpkg.com/cacache/-/cacache-15.0.4.tgz#b2c23cf4ac4f5ead004fb15a0efb0a20340741f1" - integrity sha512-YlnKQqTbD/6iyoJvEY3KJftjrdBYroCbxxYXzhOzsFLWlp6KX4BOlEf4mTx0cMUfVaTS3ENL2QtDWeRYoGLkkw== - dependencies: - "@npmcli/move-file" "^1.0.1" - chownr "^2.0.0" - fs-minipass "^2.0.0" - glob "^7.1.4" - infer-owner "^1.0.4" - lru-cache "^5.1.1" - minipass "^3.1.1" - minipass-collect "^1.0.2" - minipass-flush "^1.0.5" - minipass-pipeline "^1.2.2" - mkdirp "^1.0.3" - p-map "^4.0.0" - promise-inflight "^1.0.1" - rimraf "^3.0.2" - ssri "^8.0.0" - tar "^6.0.2" - unique-filename "^1.1.1" - cache-base@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" @@ -3788,11 +3748,6 @@ chownr@^1.1.1, chownr@^1.1.2: resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== -chownr@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece" - integrity sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ== - chrome-trace-event@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.2.tgz#234090ee97c7d4ad1a2c4beae27505deffc608a4" @@ -4929,14 +4884,6 @@ end-of-stream@^1.0.0, end-of-stream@^1.1.0: dependencies: once "^1.4.0" -enhanced-resolve@5.0.0-beta.7: - version "5.0.0-beta.7" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.0.0-beta.7.tgz#174f085396ac8edc734253f5b6aa9a05cb0d73b2" - integrity sha512-4r9mhIEedx7IsNgutSPyFtD0hKukbknr8Fuee36IXg9dYcAeDLb7l6LzBAeiDBgUKeFv+OgMSkCyp/SGCZ5Xag== - dependencies: - graceful-fs "^4.2.0" - tapable "^2.0.0-beta.10" - enhanced-resolve@^4.1.0: version "4.1.1" resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-4.1.1.tgz#2937e2b8066cd0fe7ce0990a98f0d71a35189f66" @@ -5569,15 +5516,6 @@ find-cache-dir@^2.0.0, find-cache-dir@^2.1.0: make-dir "^2.0.0" pkg-dir "^3.0.0" -find-cache-dir@^3.3.1: - version "3.3.1" - resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-3.3.1.tgz#89b33fad4a4670daa94f855f7fbe31d6d84fe880" - integrity sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ== - dependencies: - commondir "^1.0.1" - make-dir "^3.0.2" - pkg-dir "^4.1.0" - find-config@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/find-config/-/find-config-1.0.0.tgz#eafa2b9bc07fa9c90e9a0c3ef9cecf1cc800f530" @@ -5742,13 +5680,6 @@ fs-minipass@^1.2.5: dependencies: minipass "^2.6.0" -fs-minipass@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-2.1.0.tgz#7f5036fdbf12c63c169190cbe4199c852271f9fb" - integrity sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg== - dependencies: - minipass "^3.0.0" - fs-write-stream-atomic@^1.0.8: version "1.0.10" resolved "https://registry.yarnpkg.com/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz#b47df53493ef911df75731e70a9ded0189db40c9" @@ -5998,11 +5929,6 @@ glob-to-regexp@^0.3.0: resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab" integrity sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs= -glob-to-regexp@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" - integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== - glob@^7.0.0, glob@^7.0.3, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: version "7.1.6" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" @@ -7595,14 +7521,6 @@ jest-worker@^25.5.0: merge-stream "^2.0.0" supports-color "^7.0.0" -jest-worker@^26.0.0: - version "26.1.0" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-26.1.0.tgz#65d5641af74e08ccd561c240e7db61284f82f33d" - integrity sha512-Z9P5pZ6UC+kakMbNJn+tA2RdVdNX5WH1x+5UCBZ9MxIK24pjYtFt96fK+UwBTrjLYm232g1xz0L3eTh51OW+yQ== - dependencies: - merge-stream "^2.0.0" - supports-color "^7.0.0" - jest@^25.2.3: version "25.5.4" resolved "https://registry.yarnpkg.com/jest/-/jest-25.5.4.tgz#f21107b6489cfe32b076ce2adcadee3587acb9db" @@ -7985,11 +7903,6 @@ loader-runner@^2.4.0: resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.4.0.tgz#ed47066bfe534d7e84c4c7b9998c2a75607d9357" integrity sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw== -loader-runner@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-3.1.0.tgz#e9440e5875f2ad2f968489cd2c7b59a4f2847fcb" - integrity sha512-wE/bOCdTKMR2rm7Xxh+eirDOmN7Vx7hntWgiTayuFPtF8MgsFDo49SP8kkYz8IVlEBTOtR7P+XI7bE1xjo/IkA== - loader-utils@^1.2.3: version "1.4.0" resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.4.0.tgz#c579b5e34cb34b1a74edc6c1fb36bfa371d5a613" @@ -8198,7 +8111,7 @@ make-dir@^2.0.0, make-dir@^2.1.0: pify "^4.0.1" semver "^5.6.0" -make-dir@^3.0.0, make-dir@^3.0.2: +make-dir@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.0.2.tgz#04a1acbf22221e1d6ef43559f43e05a90dbb4392" integrity sha512-rYKABKutXa6vXTXhoV18cBE7PaewPXHe/Bdq4v+ZLMhxbWApkFFplT0LcbMW+6BbjnQXzZ/sAvSE/JdguApG5w== @@ -8456,7 +8369,7 @@ mime-db@1.43.0, "mime-db@>= 1.43.0 < 2": resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.43.0.tgz#0a12e0502650e473d735535050e7c8f4eb4fae58" integrity sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ== -mime-types@^2.1.12, mime-types@^2.1.26, mime-types@~2.1.17, mime-types@~2.1.19, mime-types@~2.1.24: +mime-types@^2.1.12, mime-types@~2.1.17, mime-types@~2.1.19, mime-types@~2.1.24: version "2.1.26" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.26.tgz#9c921fc09b7e149a65dfdc0da4d20997200b0a06" integrity sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ== @@ -8542,27 +8455,6 @@ minimist@~0.0.1: resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" integrity sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8= -minipass-collect@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/minipass-collect/-/minipass-collect-1.0.2.tgz#22b813bf745dc6edba2576b940022ad6edc8c617" - integrity sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA== - dependencies: - minipass "^3.0.0" - -minipass-flush@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/minipass-flush/-/minipass-flush-1.0.5.tgz#82e7135d7e89a50ffe64610a787953c4c4cbb373" - integrity sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw== - dependencies: - minipass "^3.0.0" - -minipass-pipeline@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/minipass-pipeline/-/minipass-pipeline-1.2.2.tgz#3dcb6bb4a546e32969c7ad710f2c79a86abba93a" - integrity sha512-3JS5A2DKhD2g0Gg8x3yamO0pj7YeKGwVlDS90pF++kxptwx/F+B//roxf9SqYil5tQo65bijy+dAuAFZmYOouA== - dependencies: - minipass "^3.0.0" - minipass@^2.3.5, minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0: version "2.9.0" resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6" @@ -8571,13 +8463,6 @@ minipass@^2.3.5, minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0: safe-buffer "^5.1.2" yallist "^3.0.0" -minipass@^3.0.0, minipass@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.1.1.tgz#7607ce778472a185ad6d89082aa2070f79cedcd5" - integrity sha512-UFqVihv6PQgwj8/yTGvl9kPz7xIAY+R5z6XYjRInD3Gk3qx6QGSD6zEcpeG4Dy/lQnv1J6zv8ejV90hyYIKf3w== - dependencies: - yallist "^4.0.0" - minizlib@^1.2.1: version "1.3.3" resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d" @@ -8585,14 +8470,6 @@ minizlib@^1.2.1: dependencies: minipass "^2.9.0" -minizlib@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.0.tgz#fd52c645301ef09a63a2c209697c294c6ce02cf3" - integrity sha512-EzTZN/fjSvifSX0SlqUERCN39o6T40AMarPbv0MrarSFtIITCBh7bi+dU8nxGFHuqs9jdIAeoYoKuQAAASsPPA== - dependencies: - minipass "^3.0.0" - yallist "^4.0.0" - mississippi@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/mississippi/-/mississippi-3.0.0.tgz#ea0a3291f97e0b5e8776b363d5f0a12d94c67022" @@ -8636,11 +8513,6 @@ mkdirp@0.x, mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@^0.5.3: dependencies: minimist "^1.2.5" -mkdirp@^1.0.3, mkdirp@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" - integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== - modify-values@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/modify-values/-/modify-values-1.0.1.tgz#b3939fa605546474e3e3e3c63d64bd43b4ee6022" @@ -9250,13 +9122,6 @@ p-limit@^2.0.0, p-limit@^2.2.0: dependencies: p-try "^2.0.0" -p-limit@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.0.1.tgz#584784ac0722d1aed09f19f90ed2999af6ce2839" - integrity sha512-mw/p92EyOzl2MhauKodw54Rx5ZK4624rNfgNaBguFZkHzyUG9WsDzFF5/yQVEJinbJDdP4jEfMN+uBquiGnaLg== - dependencies: - p-try "^2.0.0" - p-locate@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" @@ -9600,7 +9465,7 @@ pkg-dir@^3.0.0: dependencies: find-up "^3.0.0" -pkg-dir@^4.1.0, pkg-dir@^4.2.0: +pkg-dir@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== @@ -9885,7 +9750,7 @@ quick-lru@^4.0.1: resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-4.0.1.tgz#5b8878f113a58217848c6482026c73e1ba57727f" integrity sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g== -randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5, randombytes@^2.1.0: +randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5: version "2.1.0" resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== @@ -10540,23 +10405,6 @@ schema-utils@^1.0.0: ajv-errors "^1.0.0" ajv-keywords "^3.1.0" -schema-utils@^2.5.0: - version "2.6.5" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.6.5.tgz#c758f0a7e624263073d396e29cd40aa101152d8a" - integrity sha512-5KXuwKziQrTVHh8j/Uxz+QUbxkaLW9X/86NBlx/gnKgtsZA2GIVMUn17qWhRFwF8jdYb3Dig5hRO/W5mZqy6SQ== - dependencies: - ajv "^6.12.0" - ajv-keywords "^3.4.1" - -schema-utils@^2.6.6: - version "2.7.0" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.7.0.tgz#17151f76d8eae67fbbf77960c33c676ad9f4efc7" - integrity sha512-0ilKFI6QQF5nxDZLFn2dMjvc4hjg/Wkg7rHd3jK6/A4a1Hl9VFdQWvgB1UMGoU94pad1P/8N7fMcEnLnSiju8A== - dependencies: - "@types/json-schema" "^7.0.4" - ajv "^6.12.2" - ajv-keywords "^3.4.1" - scoped-regex@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/scoped-regex/-/scoped-regex-1.0.0.tgz#a346bb1acd4207ae70bd7c0c7ca9e566b6baddb8" @@ -10628,13 +10476,6 @@ serialize-javascript@^2.1.2: resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-2.1.2.tgz#ecec53b0e0317bdc95ef76ab7074b7384785fa61" integrity sha512-rs9OggEUF0V4jUSecXazOYsLfu7OGK2qIn3c7IPBiffz32XniEp/TX9Xmc9LQfK2nQ2QKHvZ2oygKUGU0lG4jQ== -serialize-javascript@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-4.0.0.tgz#b525e1238489a5ecfc42afacc3fe99e666f4b1aa" - integrity sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw== - dependencies: - randombytes "^2.1.0" - serve-index@^1.9.1: version "1.9.1" resolved "https://registry.yarnpkg.com/serve-index/-/serve-index-1.9.1.tgz#d3768d69b1e7d82e5ce050fff5b453bea12a9239" @@ -10894,7 +10735,7 @@ sort-keys@^2.0.0: dependencies: is-plain-obj "^1.0.0" -source-list-map@^2.0.0, source-list-map@^2.0.1: +source-list-map@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34" integrity sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw== @@ -11035,13 +10876,6 @@ ssri@^6.0.0, ssri@^6.0.1: dependencies: figgy-pudding "^3.5.1" -ssri@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/ssri/-/ssri-8.0.0.tgz#79ca74e21f8ceaeddfcb4b90143c458b8d988808" - integrity sha512-aq/pz989nxVYwn16Tsbj1TqFpD5LLrQxHf5zaHuieFV+R0Bbr4y8qUsOA45hXT/N4/9UNXTarBjnjVmjSOVaAA== - dependencies: - minipass "^3.1.1" - stack-utils@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-1.0.2.tgz#33eba3897788558bebfc2db059dc158ec36cebb8" @@ -11362,11 +11196,6 @@ tapable@^1.0.0, tapable@^1.1.3: resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA== -tapable@^2.0.0-beta.10: - version "2.0.0-beta.11" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.0.0-beta.11.tgz#5a6bd5e0353fad4da9e94942206bb596639e8cf7" - integrity sha512-cAhRzCvMdyJsxmdrSXG8/SUlJG4WJUxD/csuYAybUFjKVt74Y6pTyZ/I1ZK+enmCkWZN0JWxh14G69temaGSiA== - tar@^4.4.10, tar@^4.4.12, tar@^4.4.8: version "4.4.13" resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.13.tgz#43b364bc52888d555298637b10d60790254ab525" @@ -11380,18 +11209,6 @@ tar@^4.4.10, tar@^4.4.12, tar@^4.4.8: safe-buffer "^5.1.2" yallist "^3.0.3" -tar@^6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/tar/-/tar-6.0.2.tgz#5df17813468a6264ff14f766886c622b84ae2f39" - integrity sha512-Glo3jkRtPcvpDlAs/0+hozav78yoXKFr+c4wgw62NNMO3oo4AaJdCo21Uu7lcwr55h39W2XD1LMERc64wtbItg== - dependencies: - chownr "^2.0.0" - fs-minipass "^2.0.0" - minipass "^3.0.0" - minizlib "^2.1.0" - mkdirp "^1.0.3" - yallist "^4.0.0" - temp-dir@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/temp-dir/-/temp-dir-1.0.0.tgz#0a7c0ea26d3a39afa7e0ebea9c1fc0bc4daa011d" @@ -11446,21 +11263,6 @@ terser-webpack-plugin@^1.4.3: webpack-sources "^1.4.0" worker-farm "^1.7.0" -terser-webpack-plugin@^3.0.2: - version "3.0.6" - resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-3.0.6.tgz#db0a108bbdd3680d72c9b491fbabad09ba207b99" - integrity sha512-z3HLOOPUHkCNGkeEHqqiMAIy1pjpHwS1o+i6Zn0Ws3EAvHJj46737efNNEvJ0Vx9BdDQM83d56qySDJOSORA0A== - dependencies: - cacache "^15.0.4" - find-cache-dir "^3.3.1" - jest-worker "^26.0.0" - p-limit "^3.0.1" - schema-utils "^2.6.6" - serialize-javascript "^4.0.0" - source-map "^0.6.1" - terser "^4.8.0" - webpack-sources "^1.4.3" - terser@^4.1.2: version "4.6.7" resolved "https://registry.yarnpkg.com/terser/-/terser-4.6.7.tgz#478d7f9394ec1907f0e488c5f6a6a9a2bad55e72" @@ -11470,15 +11272,6 @@ terser@^4.1.2: source-map "~0.6.1" source-map-support "~0.5.12" -terser@^4.8.0: - version "4.8.0" - resolved "https://registry.yarnpkg.com/terser/-/terser-4.8.0.tgz#63056343d7c70bb29f3af665865a46fe03a0df17" - integrity sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw== - dependencies: - commander "^2.20.0" - source-map "~0.6.1" - source-map-support "~0.5.12" - test-exclude@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" @@ -12090,14 +11883,6 @@ watchpack-chokidar2@^2.0.0: dependencies: chokidar "^2.1.8" -watchpack@2.0.0-beta.13: - version "2.0.0-beta.13" - resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.0.0-beta.13.tgz#9d9b0c094b8402139333e04eb6194643c8384f55" - integrity sha512-ZEFq2mx/k5qgQwgi6NOm+2ImICb8ngAkA/rZ6oyXZ7SgPn3pncf+nfhYTCrs3lmHwOxnPtGLTOuFLfpSMh1VMA== - dependencies: - glob-to-regexp "^0.4.1" - graceful-fs "^4.1.2" - watchpack@^1.6.1: version "1.7.2" resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.7.2.tgz#c02e4d4d49913c3e7e122c3325365af9d331e9aa" @@ -12193,15 +11978,7 @@ webpack-merge@^4.2.2: dependencies: lodash "^4.17.15" -webpack-sources@2.0.0-beta.8: - version "2.0.0-beta.8" - resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-2.0.0-beta.8.tgz#0fc292239f6767cf4e9b47becfaa340ce6d7ea4f" - integrity sha512-RUaCJu7HYNeuzlY4WYcArcnOzMIj7kHndQ4pBdgP3iiMpG3Ke0BWY5wvb/VEFgsIXp3ZzPGRECwX+4fgpcKFYw== - dependencies: - source-list-map "^2.0.1" - source-map "~0.6.1" - -webpack-sources@^1.4.0, webpack-sources@^1.4.1, webpack-sources@^1.4.3: +webpack-sources@^1.4.0, webpack-sources@^1.4.1: version "1.4.3" resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.4.3.tgz#eedd8ec0b928fbf1cbfe994e22d2d890f330a933" integrity sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ== @@ -12209,7 +11986,7 @@ webpack-sources@^1.4.0, webpack-sources@^1.4.1, webpack-sources@^1.4.3: source-list-map "^2.0.0" source-map "~0.6.1" -webpack@4.x.x: +webpack@4.x.x, webpack@^4.43.0: version "4.43.0" resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.43.0.tgz#c48547b11d563224c561dad1172c8aa0b8a678e6" integrity sha512-GW1LjnPipFW2Y78OOab8NJlCflB7EFskMih2AHdvjbpKMeDJqEgSx24cXXXiPS65+WSwVyxtDsJH6jGX2czy+g== @@ -12238,34 +12015,6 @@ webpack@4.x.x: watchpack "^1.6.1" webpack-sources "^1.4.1" -webpack@^5.0.0-beta.20: - version "5.0.0-beta.20" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.0.0-beta.20.tgz#a4798bbbe5bd27651f85f401f7b05ebc94a9399a" - integrity sha512-bIUAephArRkyWBzhLJ7OD5ys+jTNgANuJJy4+qhAWd5De4T0l/qKrVYdXZCbAj3PXUdxyEL5KsJHPQHacyfBGQ== - dependencies: - "@types/estree" "0.0.42" - "@webassemblyjs/ast" "1.9.0" - "@webassemblyjs/helper-module-context" "1.9.0" - "@webassemblyjs/wasm-edit" "1.9.0" - "@webassemblyjs/wasm-parser" "1.9.0" - acorn "^7.0.0" - chrome-trace-event "^1.0.2" - enhanced-resolve "5.0.0-beta.7" - eslint-scope "^5.0.0" - events "^3.0.0" - glob-to-regexp "^0.4.1" - graceful-fs "^4.1.15" - json-parse-better-errors "^1.0.2" - loader-runner "^3.1.0" - mime-types "^2.1.26" - neo-async "^2.6.1" - pkg-dir "^4.2.0" - schema-utils "^2.5.0" - tapable "^2.0.0-beta.10" - terser-webpack-plugin "^3.0.2" - watchpack "2.0.0-beta.13" - webpack-sources "2.0.0-beta.8" - websocket-driver@>=0.5.1: version "0.7.3" resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.3.tgz#a2d4e0d4f4f116f1e6297eba58b05d430100e9f9" @@ -12512,11 +12261,6 @@ yallist@^3.0.0, yallist@^3.0.2, yallist@^3.0.3: resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== -yallist@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" - integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== - yaml@^1.7.2: version "1.8.3" resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.8.3.tgz#2f420fca58b68ce3a332d0ca64be1d191dd3f87a" From fa74fd15f23cc302edb68835f1a2a4ec24b7c1c8 Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Mon, 20 Jul 2020 14:47:20 +0530 Subject: [PATCH 09/21] fix: broken flags --- packages/webpack-cli/lib/utils/cli-flags.js | 4 +--- test/core-flags/module-flags.test.js | 8 ++++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/webpack-cli/lib/utils/cli-flags.js b/packages/webpack-cli/lib/utils/cli-flags.js index dc4ad0a2e32..33ad53ec4c5 100644 --- a/packages/webpack-cli/lib/utils/cli-flags.js +++ b/packages/webpack-cli/lib/utils/cli-flags.js @@ -34,12 +34,10 @@ let flagsFromCore = // duplicate flags const duplicateFlags = ['entry', 'mode', 'stats', 'watch', 'target']; -// broken flags -const brokenFlags = ['module-no-parse', 'module-no-parse-reset', 'optimization-no-emit-on-errors']; // regExp Flags const regExpFlags = ['module-expr-context-reg-exp', 'module-unknown-context-reg-exp', 'module-wrapped-context-reg-exp']; // filter all duplicate, broken and regExp flags -const flagsToFilter = [...duplicateFlags, ...brokenFlags, ...regExpFlags]; +const flagsToFilter = [...duplicateFlags, ...regExpFlags]; flagsFromCore = flagsFromCore.filter((flag) => !flagsToFilter.includes(flag.name)); module.exports = { diff --git a/test/core-flags/module-flags.test.js b/test/core-flags/module-flags.test.js index b675ca70fe3..cfae696ff7b 100644 --- a/test/core-flags/module-flags.test.js +++ b/test/core-flags/module-flags.test.js @@ -13,7 +13,7 @@ describe('module config related flag', () => { //TODO: improve webpackCLITestPlugin for testing of nested options // i.e, module-rules-* flags, right now it logs rules: [Object] only. - if (flag.type === Boolean && !flag.name.includes('rules-')) { + if (flag.type === Boolean && !flag.name.includes('rules-') && !flag.name.includes('module-no-parse')) { it(`should config --${flag.name} correctly`, () => { const { stderr, stdout } = run(__dirname, [`--${flag.name}`]); expect(stderr).toBeFalsy(); @@ -41,7 +41,11 @@ describe('module config related flag', () => { it(`should config --${flag.name} correctly`, () => { const { stderr, stdout } = run(__dirname, [`--${flag.name}`, 'value']); expect(stderr).toBeFalsy(); - expect(stdout).toContain(`${propName}: 'value'`); + if (flag.name === 'module-no-parse') { + expect(stdout).toContain('value'); + } else { + expect(stdout).toContain(`${propName}: 'value'`); + } }); } }); From 7e844be49ea9b0cb423fcd3bdcd59ff9342ddd59 Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Tue, 21 Jul 2020 16:53:34 +0530 Subject: [PATCH 10/21] fix: reg-exp flags support --- packages/webpack-cli/lib/utils/cli-flags.js | 7 ++----- test/core-flags/module-flags.test.js | 5 ++++- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/webpack-cli/lib/utils/cli-flags.js b/packages/webpack-cli/lib/utils/cli-flags.js index 33ad53ec4c5..bcb0e549027 100644 --- a/packages/webpack-cli/lib/utils/cli-flags.js +++ b/packages/webpack-cli/lib/utils/cli-flags.js @@ -34,11 +34,8 @@ let flagsFromCore = // duplicate flags const duplicateFlags = ['entry', 'mode', 'stats', 'watch', 'target']; -// regExp Flags -const regExpFlags = ['module-expr-context-reg-exp', 'module-unknown-context-reg-exp', 'module-wrapped-context-reg-exp']; -// filter all duplicate, broken and regExp flags -const flagsToFilter = [...duplicateFlags, ...regExpFlags]; -flagsFromCore = flagsFromCore.filter((flag) => !flagsToFilter.includes(flag.name)); + +flagsFromCore = flagsFromCore.filter((flag) => !duplicateFlags.includes(flag.name)); module.exports = { groups: { diff --git a/test/core-flags/module-flags.test.js b/test/core-flags/module-flags.test.js index cfae696ff7b..412670300dd 100644 --- a/test/core-flags/module-flags.test.js +++ b/test/core-flags/module-flags.test.js @@ -39,10 +39,13 @@ describe('module config related flag', () => { if (flag.type === String && !flag.name.includes('rules-')) { it(`should config --${flag.name} correctly`, () => { - const { stderr, stdout } = run(__dirname, [`--${flag.name}`, 'value']); + let { stderr, stdout } = run(__dirname, [`--${flag.name}`, 'value']); expect(stderr).toBeFalsy(); if (flag.name === 'module-no-parse') { expect(stdout).toContain('value'); + } else if (flag.name.includes('reg-exp')) { + stdout = run(__dirname, [`--${flag.name}`, '/ab?c*/']).stdout; + expect(stdout).toContain(`${propName}: /ab?c*/`); } else { expect(stdout).toContain(`${propName}: 'value'`); } From 3871afbdfde73aef1868bb5be83bc42795d92154 Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Wed, 22 Jul 2020 17:33:07 +0530 Subject: [PATCH 11/21] docs: add v5 options --- packages/webpack-cli/README.md | 928 ++++++++++++++++++++++++++++++++- 1 file changed, 927 insertions(+), 1 deletion(-) diff --git a/packages/webpack-cli/README.md b/packages/webpack-cli/README.md index 56dcd262574..520337725bb 100644 --- a/packages/webpack-cli/README.md +++ b/packages/webpack-cli/README.md @@ -33,7 +33,7 @@ Available Commands info Outputs information about your system and dependencies serve Run the webpack Dev Server -Options +Options (for webpack 4) --entry string[] The entry point(s) of your application. -c, --config string Provide path to a webpack configuration file @@ -55,6 +55,932 @@ Options --stats string It instructs webpack on how to treat the stats --no-stats Disables stats output --verbose It tells webpack to output all the information + + Options (for webpack 5) + + --amd You can pass `false` to disable AMD + support. + --bail Report the first error as a hard error + instead of tolerating it. + --cache Enable in memory caching. Disable + caching. + --cache-immutable-paths string[] A path to a immutable directory (usually + a package manager cache directory). + --cache-immutable-paths-reset Clear all items provided in + configuration. List of paths that are + managed by a package manager and contain + a version or hash in its path so all + files are immutable. + --cache-managed-paths string[] A path to a managed directory (usually a + node_modules directory). + --cache-managed-paths-reset Clear all items provided in + configuration. List of paths that are + managed by a package manager and can be + trusted to not be modified otherwise. + --cache-type string In memory caching. Filesystem caching. + --cache-cache-directory string Base directory for the cache (defaults + to node_modules/.cache/webpack). + --cache-cache-location string Locations for the cache (defaults to + cacheDirectory / name). + --cache-hash-algorithm string Algorithm used for generation the hash + (see node.js crypto package). + --cache-idle-timeout number Time in ms after which idle period the + cache storing should happen (only for + store: 'pack' or 'idle'). + --cache-idle-timeout-for-initial-store number Time in ms after which idle period the + initial cache storing should happen + (only for store: 'pack' or 'idle'). + --cache-name string Name for the cache. Different names will + lead to different coexisting caches. + --cache-store string When to store data to the filesystem. + (pack: Store data when compiler is idle + in a single file). + --cache-version string Version of the cache data. Different + versions won't allow to reuse the cache + and override existing content. Update + the version when config changed in a way + which doesn't allow to reuse cache. + This will invalidate the cache. + --context string The base directory (absolute path!) for + resolving the `entry` option. If + `output.pathinfo` is set, the included + pathinfo is shortened to this directory. + --dependencies string[] References to another configuration to + depend on. + --dependencies-reset Clear all items provided in + configuration. References to other + configurations to depend on. + --devtool string A developer tool to enhance debugging + (false | eval | + [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map). + --entry-reset Clear all items provided in + configuration. All modules are loaded + upon startup. The last one is exported. + --experiments-asset Allow module type 'asset' to generate + assets. + --experiments-async-web-assembly Support WebAssembly as asynchronous + EcmaScript Module. + --experiments-import-async Allow 'import/export' syntax to import + async modules. + --experiments-import-await Allow 'import/export await' syntax to + import async modules. + --experiments-mjs Support .mjs files as way to define + strict ESM file (node.js). + --experiments-output-module Allow output javascript files as module + source type. + --experiments-sync-web-assembly Support WebAssembly as synchronous + EcmaScript Module (outdated). + --experiments-top-level-await Allow using top-level-await in + EcmaScript Modules. + --externals string[] Every matched dependency becomes + external. An exact matched dependency + becomes external. The same string is + used as external dependency. + --externals-reset Clear all items provided in + configuration. Specify dependencies that + shouldn't be resolved by webpack, but + should become dependencies of the + resulting bundle. The kind of the + dependency depends on + `output.libraryTarget`. + --externals-type string Specifies the default type of externals + ('amd*', 'umd*', 'system' and 'jsonp' + depend on output.libraryTarget set to + the same value). + --infrastructure-logging-debug string[] Enable/Disable debug logging for all + loggers. Enable debug logging for + specific loggers. + --infrastructure-logging-debug-reset Clear all items provided in + configuration. Enable debug logging for + specific loggers. + --infrastructure-logging-level string Log level. + --module-expr-context-critical Enable warnings for full dynamic + dependencies. + --module-expr-context-recursive Enable recursive directory lookup for + full dynamic dependencies. + --module-expr-context-reg-exp string Sets the default regular expression for + full dynamic dependencies. + --module-expr-context-request string Set the default request for full dynamic + dependencies. + --module-no-parse string[] A regular expression, when matched the + module is not parsed. An absolute path, + when the module starts with this path it + is not parsed. + --module-no-parse-reset Clear all items provided in + configuration. Don't parse files + matching. It's matched against the full + resolved request. + --module-rules-compiler string[] Match the child compiler name. + --module-rules-enforce string[] Enforce this rule as pre or post step. + --module-rules-exclude string[] Shortcut for resource.exclude. + --module-rules-include string[] Shortcut for resource.include. + --module-rules-issuer string[] Match the issuer of the module (The + module pointing to this module). + --module-rules-loader string[] A loader request. + --module-rules-mimetype string[] Match module mimetype when load from + Data URI. + --module-rules-options string[] Options passed to a loader. + --module-rules-real-resource string[] Match the real resource path of the + module. + --module-rules-resource string[] Match the resource path of the module. + --module-rules-resource-fragment string[] Match the resource fragment of the + module. + --module-rules-resource-query string[] Match the resource query of the module. + --module-rules-side-effects Flags a module as with or without side + effects. + --module-rules-test string[] Shortcut for resource.test. + --module-rules-type string[] Module type to use for the module. + --module-rules-use-ident string[] Unique loader options identifier. + --module-rules-use-loader string[] A loader request. + --module-rules-use-options string[] Options passed to a loader. + --module-rules-use string[] A loader request. + --module-rules-reset Clear all items provided in + configuration. A list of rules. + --module-strict-export-presence Emit errors instead of warnings when + imported names don't exist in imported + module. + --module-strict-this-context-on-imports Handle the this context correctly + according to the spec for namespace + objects. + --module-unknown-context-critical Enable warnings when using the require + function in a not statically analyse- + able way. + --module-unknown-context-recursive Enable recursive directory lookup when + using the require function in a not + statically analyse-able way. + --module-unknown-context-reg-exp string Sets the regular expression when using + the require function in a not statically + analyse-able way. + --module-unknown-context-request string Sets the request when using the require + function in a not statically analyse- + able way. + --module-unsafe-cache Cache the resolving of module requests. + --module-wrapped-context-critical Enable warnings for partial dynamic + dependencies. + --module-wrapped-context-recursive Enable recursive directory lookup for + partial dynamic dependencies. + --module-wrapped-context-reg-exp string Set the inner regular expression for + partial dynamic dependencies. + --name string Name of the configuration. Used when + loading multiple configurations. + --node Include polyfills or mocks for various + node stuff. + --node-dirname string Include a polyfill for the '__dirname' + variable. + --node-filename string Include a polyfill for the '__filename' + variable. + --node-global Include a polyfill for the 'global' + variable. + --optimization-check-wasm-types Check for incompatible wasm types when + importing/exporting from/to ESM. + --optimization-chunk-ids string Define the algorithm to choose chunk ids + (named: readable ids for better + debugging, deterministic: numeric hash + ids for better long term caching, size: + numeric ids focused on minimal initial + download size, total-size: numeric ids + focused on minimal total download size, + false: no algorithm used, as custom one + can be provided via plugin). + --optimization-concatenate-modules Concatenate modules when possible to + generate less modules, more efficient + code and enable more optimizations by + the minimizer. + --optimization-emit-on-errors Emit assets even when errors occur. + Critical errors are emitted into the + generated code and will case errors at + runtime. + --optimization-flag-included-chunks Also flag chunks as loaded which contain + a subset of the modules. + --optimization-inner-graph Creates a module-internal dependency + graph for top level symbols, exports and + imports, to improve unused exports + detection. + --optimization-mangle-exports Rename exports when possible to generate + shorter code (depends on + optimization.usedExports and + optimization.providedExports). + --optimization-mangle-wasm-imports Reduce size of WASM by changing imports + to shorter strings. + --optimization-merge-duplicate-chunks Merge chunks which contain the same + modules. + --optimization-minimize Enable minimizing the output. Uses + optimization.minimizer. + --optimization-module-ids string Define the algorithm to choose module + ids (natural: numeric ids in order of + usage, named: readable ids for better + debugging, hashed: (deprecated) short + hashes as ids for better long term + caching, deterministic: numeric hash ids + for better long term caching, size: + numeric ids focused on minimal initial + download size, false: no algorithm used, + as custom one can be provided via + plugin). + --optimization-node-env string Set process.env.NODE_ENV to a specific + value. + --optimization-portable-records Generate records with relative paths to + be able to move the context folder. + --optimization-provided-exports Figure out which exports are provided by + modules to generate more efficient + code. + --optimization-remove-available-modules Removes modules from chunks when these + modules are already included in all + parents. + --optimization-remove-empty-chunks Remove chunks which are empty. + --optimization-runtime-chunk string Create an additional chunk which + contains only the webpack runtime and + chunk hash maps. + --optimization-runtime-chunk-name string The name or name factory for the runtime + chunks. + --optimization-side-effects Skip over modules which are flagged to + contain no side effects when exports are + not used. + --optimization-split-chunks Optimize duplication and caching by + splitting chunks by shared modules and + cache group. + --optimization-split-chunks-automatic-name-delimiter string Sets the name delimiter for created + chunks. + --optimization-split-chunks-chunks string Select chunks for determining shared + modules (defaults to "async", "initial" + and "all" requires adding these chunks + to the HTML). + --optimization-split-chunks-enforce-size-threshold number Size of the javascript part of the + chunk. + --optimization-split-chunks-fallback-cache-group-automatic-name-delimiter string Sets the name delimiter for created + chunks. + --optimization-split-chunks-fallback-cache-group-max-async-size number Size of the javascript part of the + chunk. + --optimization-split-chunks-fallback-cache-group-max-initial-size number Size of the javascript part of the + chunk. + --optimization-split-chunks-fallback-cache-group-max-size number Size of the javascript part of the + chunk. + --optimization-split-chunks-fallback-cache-group-min-size number Size of the javascript part of the + chunk. + --optimization-split-chunks-filename string Sets the template for the filename for + created chunks. + --optimization-split-chunks-hide-path-info Prevents exposing path info when + creating names for parts splitted by + maxSize. + --optimization-split-chunks-max-async-requests number Maximum number of requests which are + accepted for on-demand loading. + --optimization-split-chunks-max-async-size number Size of the javascript part of the + chunk. + --optimization-split-chunks-max-initial-requests number Maximum number of initial chunks which + are accepted for an entry point. + --optimization-split-chunks-max-initial-size number Size of the javascript part of the + chunk. + --optimization-split-chunks-max-size number Size of the javascript part of the + chunk. + --optimization-split-chunks-min-chunks number Minimum number of times a module has to + be duplicated until it's considered for + splitting. + --optimization-split-chunks-min-remaining-size number Size of the javascript part of the + chunk. + --optimization-split-chunks-min-size number Size of the javascript part of the + chunk. + --optimization-split-chunks-name string Give chunks created a name (chunks with + equal name are merged). + --optimization-used-exports Figure out which exports are used by + modules to mangle export names, omit + unused exports and generate more + efficient code. + --output-asset-module-filename string The filename of asset modules as + relative path inside the `output.path` + directory. + --output-chunk-callback-name string The callback function name used by + webpack for loading of chunks in + WebWorkers. + --output-chunk-filename string The filename of non-entry chunks as + relative path inside the `output.path` + directory. + --output-chunk-load-timeout number Number of milliseconds before chunk + request expires. + --output-compare-before-emit Check if to be emitted file already + exists and have the same content before + writing to output filesystem. + --output-cross-origin-loading string This option enables cross-origin loading + of chunks. + --output-devtool-fallback-module-filename-template string Similar to + `output.devtoolModuleFilenameTemplate`, + but used in the case of duplicate module + identifiers. + --output-devtool-module-filename-template string Filename template string of function for + the sources array in a generated + SourceMap. + --output-devtool-namespace string Module namespace to use when + interpolating filename template string + for the sources array in a generated + SourceMap. Defaults to `output.library` + if not set. It's useful for avoiding + runtime collisions in sourcemaps from + multiple webpack projects built as + libraries. + --output-ecma-version number The maximum EcmaScript version of the + webpack generated code (doesn't include + input source code from modules). + --output-enabled-library-types string[] Type of library. + --output-enabled-library-types-reset Clear all items provided in + configuration. List of library types + enabled for use by entry points. + --output-filename string Specifies the name of each output file + on disk. You must **not** specify an + absolute path here! The `output.path` + option determines the location on disk + the files are written to, filename is + used solely for naming the individual + files. + --output-global-object string An expression which is used to address + the global object/scope in runtime code. + --output-hash-digest string Digest type used for the hash. + --output-hash-digest-length number Number of chars which are used for the + hash. + --output-hash-function string Algorithm used for generation the hash + (see node.js crypto package). + --output-hash-salt string Any string which is added to the hash to + salt it. + --output-hot-update-chunk-filename string The filename of the Hot Update Chunks. + They are inside the output.path + directory. + --output-hot-update-function string The JSONP function used by webpack for + async loading of hot update chunks. + --output-hot-update-main-filename string The filename of the Hot Update Main + File. It is inside the `output.path` + directory. + --output-iife Wrap javascript code into IIFE's to + avoid leaking into global scope. + --output-import-function-name string The name of the native import() function + (can be exchanged for a polyfill). + --output-jsonp-function string The JSONP function used by webpack for + async loading of chunks. + --output-library string[] A part of the library name. + --output-library-reset Clear all items provided in + configuration. The name of the library + (some types allow unnamed libraries + too). + --output-library-amd string Name of the exposed AMD library in the + UMD. + --output-library-commonjs string Name of the exposed commonjs export in + the UMD. + --output-library-root string[] Part of the name of the property exposed + globally by a UMD library. + --output-library-root-reset Clear all items provided in + configuration. Name of the property + exposed globally by a UMD library. + --output-library-auxiliary-comment string Append the same comment above each + import style. + --output-library-auxiliary-comment-amd string Set comment for `amd` section in UMD. + --output-library-auxiliary-comment-commonjs string Set comment for `commonjs` (exports) + section in UMD. + --output-library-auxiliary-comment-commonjs2 string Set comment for `commonjs2` + (module.exports) section in UMD. + --output-library-auxiliary-comment-root string Set comment for `root` (global variable) + section in UMD. + --output-library-export string[] Part of the export that should be + exposed as library. + --output-library-export-reset Clear all items provided in + configuration. Specify which export + should be exposed as library. + --output-library-name string[] A part of the library name. + --output-library-name-reset Clear all items provided in + configuration. The name of the library + (some types allow unnamed libraries + too). + --output-library-name-amd string Name of the exposed AMD library in the + UMD. + --output-library-name-commonjs string Name of the exposed commonjs export in + the UMD. + --output-library-name-root string[] Part of the name of the property exposed + globally by a UMD library. + --output-library-name-root-reset Clear all items provided in + configuration. Name of the property + exposed globally by a UMD library. + --output-library-type string Type of library. + --output-library-umd-named-define If `output.libraryTarget` is set to umd + and `output.library` is set, setting + this to true will name the AMD module. + --output-module Output javascript files as module source + type. + --output-path string The output directory as **absolute + path** (required). + --output-pathinfo Include comments with information about + the modules. + --output-public-path string The `publicPath` specifies the public + URL address of the output files when + referenced in a browser. + --output-script-type string This option enables loading async chunks + via a custom script type, such as + script type="module". + --output-source-map-filename string The filename of the SourceMaps for the + JavaScript files. They are inside the + `output.path` directory. + --output-source-prefix string Prefixes every line of the source in the + bundle with this string. + --output-strict-module-exception-handling Handles exceptions in module loading + correctly at a performance cost. + --output-unique-name string A unique name of the webpack build to + avoid multiple webpack runtimes to + conflict when using globals. + --output-webassembly-module-filename string The filename of WebAssembly modules as + relative path inside the `output.path` + directory. + --parallelism number The number of parallel processed modules + in the compilation. + --performance Configuration for web performance + recommendations. + --performance-hints string Sets the format of the hints: warnings, + errors or nothing at all. + --performance-max-asset-size number File size limit (in bytes) when + exceeded, that webpack will provide + performance hints. + --performance-max-entrypoint-size number Total size of an entry point (in bytes). + --profile Capture timing information for each + module. + --records-input-path string Store compiler state to a json file. + --records-output-path string Load compiler state from a json file. + --records-path string Store/Load compiler state from/to a json + file. This will result in persistent + ids of modules and chunks. An absolute + path is expected. `recordsPath` is used + for `recordsInputPath` and + `recordsOutputPath` if they left + undefined. + --resolve-alias-alias string[] Ignore request (replace with empty + module). New request. + --resolve-alias-name string[] Request to be redirected. + --resolve-alias-only-module Redirect only exact matching request. + --resolve-alias-reset Clear all items provided in + configuration. Redirect module requests. + --resolve-alias-fields string[] Field in the description file (usually + package.json) which are used to redirect + requests inside the module. + --resolve-alias-fields-reset Clear all items provided in + configuration. Fields in the description + file (usually package.json) which are + used to redirect requests inside the + module. + --resolve-cache Enable caching of successfully resolved + requests (cache entries are + revalidated). + --resolve-cache-with-context Include the context information in the + cache identifier when caching. + --resolve-condition-names string[] Condition names for exports field entry + point. + --resolve-condition-names-reset Clear all items provided in + configuration. Condition names for + exports field entry point. + --resolve-description-files string[] Filename used to find a description file + (like a package.json). + --resolve-description-files-reset Clear all items provided in + configuration. Filenames used to find a + description file (like a package.json). + --resolve-enforce-extension Enforce the resolver to use one of the + extensions from the extensions option + (User must specify requests without + extension). + --resolve-exports-fields string[] Field name from the description file + (usually package.json) which is used to + provide entry points of a package. + --resolve-exports-fields-reset Clear all items provided in + configuration. Field names from the + description file (usually package.json) + which are used to provide entry points + of a package. + --resolve-extensions string[] Extension added to the request when + trying to find the file. + --resolve-extensions-reset Clear all items provided in + configuration. Extensions added to the + request when trying to find the file. + --resolve-fully-specified Treats the request specified by the user + as fully specified, meaning no + extensions are added and the mainFiles + in directories are not resolved (This + doesn't affect requests from mainFields, + aliasFields or aliases). + --resolve-main-fields string[] Field name from the description file + (package.json) which are used to find + the default entry point. + --resolve-main-fields-reset Clear all items provided in + configuration. Field names from the + description file (package.json) which + are used to find the default entry + point. + --resolve-main-files string[] Filename used to find the default entry + point if there is no description file or + main field. + --resolve-main-files-reset Clear all items provided in + configuration. Filenames used to find + the default entry point if there is no + description file or main field. + --resolve-modules string[] Folder name or directory path where to + find modules. + --resolve-modules-reset Clear all items provided in + configuration. Folder names or directory + paths where to find modules. + --resolve-restrictions string[] Resolve restriction. Resolve result must + fulfill this restriction. + --resolve-restrictions-reset Clear all items provided in + configuration. A list of resolve + restrictions. Resolve results must + fulfill all of these restrictions to + resolve successfully. Other resolve + paths are taken when restrictions are + not met. + --resolve-roots string[] Directory in which requests that are + server-relative URLs (starting with '/') + are resolved. + --resolve-roots-reset Clear all items provided in + configuration. A list of directories in + which requests that are server-relative + URLs (starting with '/') are resolved. + On non-windows system these requests are + tried to resolve as absolute path + first. + --resolve-symlinks Enable resolving symlinks to the + original location. + --resolve-unsafe-cache Enable caching of successfully resolved + requests (cache entries are not + revalidated). + --resolve-use-sync-file-system-calls Use synchronous filesystem calls for the + resolver. + --resolve-loader-alias-alias string[] Ignore request (replace with empty + module). New request. + --resolve-loader-alias-name string[] Request to be redirected. + --resolve-loader-alias-only-module Redirect only exact matching request. + --resolve-loader-alias-reset Clear all items provided in + configuration. Redirect module requests. + --resolve-loader-alias-fields string[] Field in the description file (usually + package.json) which are used to redirect + requests inside the module. + --resolve-loader-alias-fields-reset Clear all items provided in + configuration. Fields in the description + file (usually package.json) which are + used to redirect requests inside the + module. + --resolve-loader-cache Enable caching of successfully resolved + requests (cache entries are + revalidated). + --resolve-loader-cache-with-context Include the context information in the + cache identifier when caching. + --resolve-loader-condition-names string[] Condition names for exports field entry + point. + --resolve-loader-condition-names-reset Clear all items provided in + configuration. Condition names for + exports field entry point. + --resolve-loader-description-files string[] Filename used to find a description file + (like a package.json). + --resolve-loader-description-files-reset Clear all items provided in + configuration. Filenames used to find a + description file (like a package.json). + --resolve-loader-enforce-extension Enforce the resolver to use one of the + extensions from the extensions option + (User must specify requests without + extension). + --resolve-loader-exports-fields string[] Field name from the description file + (usually package.json) which is used to + provide entry points of a package. + --resolve-loader-exports-fields-reset Clear all items provided in + configuration. Field names from the + description file (usually package.json) + which are used to provide entry points + of a package. + --resolve-loader-extensions string[] Extension added to the request when + trying to find the file. + --resolve-loader-extensions-reset Clear all items provided in + configuration. Extensions added to the + request when trying to find the file. + --resolve-loader-fully-specified Treats the request specified by the user + as fully specified, meaning no + extensions are added and the mainFiles + in directories are not resolved (This + doesn't affect requests from mainFields, + aliasFields or aliases). + --resolve-loader-main-fields string[] Field name from the description file + (package.json) which are used to find + the default entry point. + --resolve-loader-main-fields-reset Clear all items provided in + configuration. Field names from the + description file (package.json) which + are used to find the default entry + point. + --resolve-loader-main-files string[] Filename used to find the default entry + point if there is no description file or + main field. + --resolve-loader-main-files-reset Clear all items provided in + configuration. Filenames used to find + the default entry point if there is no + description file or main field. + --resolve-loader-modules string[] Folder name or directory path where to + find modules. + --resolve-loader-modules-reset Clear all items provided in + configuration. Folder names or directory + paths where to find modules. + --resolve-loader-restrictions string[] Resolve restriction. Resolve result must + fulfill this restriction. + --resolve-loader-restrictions-reset Clear all items provided in + configuration. A list of resolve + restrictions. Resolve results must + fulfill all of these restrictions to + resolve successfully. Other resolve + paths are taken when restrictions are + not met. + --resolve-loader-roots string[] Directory in which requests that are + server-relative URLs (starting with '/') + are resolved. + --resolve-loader-roots-reset Clear all items provided in + configuration. A list of directories in + which requests that are server-relative + URLs (starting with '/') are resolved. + On non-windows system these requests are + tried to resolve as absolute path + first. + --resolve-loader-symlinks Enable resolving symlinks to the + original location. + --resolve-loader-unsafe-cache Enable caching of successfully resolved + requests (cache entries are not + revalidated). + --resolve-loader-use-sync-file-system-calls Use synchronous filesystem calls for the + resolver. + --stats-all Fallback value for stats options when an + option is not defined (has precedence + over local webpack defaults). + --stats-assets Add assets information. + --stats-assets-sort string Sort the assets by that field. + --stats-built-at Add built at time information. + --stats-cached Add information about cached (not built) + modules. + --stats-cached-assets Show cached assets (setting this to + `false` only shows emitted files). + --stats-children Add children information. + --stats-chunk-groups Display all chunk groups with the + corresponding bundles. + --stats-chunk-modules Add built modules information to chunk + information. + --stats-chunk-origins Add the origins of chunks and chunk + merging info. + --stats-chunk-relations Add information about parent, children + and sibling chunks to chunk information. + --stats-chunk-root-modules Add root modules information to chunk + information. + --stats-chunks Add chunk information. + --stats-chunks-sort string Sort the chunks by that field. + --stats-colors Enables/Disables colorful output. + --stats-colors-bold string Custom color for bold text. + --stats-colors-cyan string Custom color for cyan text. + --stats-colors-green string Custom color for green text. + --stats-colors-magenta string Custom color for magenta text. + --stats-colors-red string Custom color for red text. + --stats-colors-yellow string Custom color for yellow text. + --stats-context string Context directory for request + shortening. + --stats-depth Add module depth in module graph. + --stats-entrypoints Display the entry points with the + corresponding bundles. + --stats-env Add --env information. + --stats-error-details Add details to errors (like resolving + log). + --stats-error-stack Add internal stack trace to errors. + --stats-errors Add errors. + --stats-exclude-assets string[] Suppress assets that match the specified + filters. Filters can be Strings, + RegExps or Functions. + --stats-exclude-assets-reset Clear all items provided in + configuration. Suppress assets that + match the specified filters. Filters can + be Strings, RegExps or Functions. + --stats-exclude-modules string[] Suppress modules that match the + specified filters. Filters can be + Strings, RegExps, Booleans or Functions. + --stats-exclude-modules-reset Clear all items provided in + configuration. Suppress modules that + match the specified filters. Filters can + be Strings, RegExps, Booleans or + Functions. + --stats-hash Add the hash of the compilation. + --stats-ids Add ids. + --stats-logging string Specify log level of logging output. + Enable/disable logging output (`true`: + shows normal logging output, loglevel: + log). + --stats-logging-debug string[] Enable/Disable debug logging for all + loggers. Include debug logging of + specified loggers (i. e. for plugins or + loaders). Filters can be Strings, + RegExps or Functions. + --stats-logging-debug-reset Clear all items provided in + configuration. Include debug logging of + specified loggers (i. e. for plugins or + loaders). Filters can be Strings, + RegExps or Functions. + --stats-logging-trace Add stack traces to logging output. + --stats-max-modules number Set the maximum number of modules to be + shown. + --stats-module-assets Add information about assets inside + modules. + --stats-module-trace Add dependencies and origin of + warnings/errors. + --stats-modules Add built modules information. + --stats-modules-sort string Sort the modules by that field. + --stats-nested-modules Add information about modules nested in + other modules (like with module + concatenation). + --stats-optimization-bailout Show reasons why optimization bailed out + for modules. + --stats-orphan-modules Add information about orphan modules. + --stats-output-path Add output path information. + --stats-performance Add performance hint flags. + --stats-preset string Preset for the default values. + --stats-provided-exports Show exports provided by modules. + --stats-public-path Add public path information. + --stats-reasons Add information about the reasons why + modules are included. + --stats-runtime Add information about runtime modules. + --stats-source Add the source code of modules. + --stats-timings Add timing information. + --stats-used-exports Show exports used by modules. + --stats-version Add webpack version information. + --stats-warnings Add warnings. + --stats-warnings-filter string[] Suppress warnings that match the + specified filters. Filters can be + Strings, RegExps or Functions. + --stats-warnings-filter-reset Clear all items provided in + configuration. Suppress warnings that + match the specified filters. Filters can + be Strings, RegExps or Functions. + --watch-options-aggregate-timeout number Delay the rebuilt after the first + change. Value is a time in ms. + --watch-options-ignored string[] A glob pattern for files that should be + ignored from watching. + --watch-options-ignored-reset Clear all items provided in + configuration. Ignore some files from + watching (glob pattern). + --watch-options-poll string `number`: use polling with specified + interval. `true`: use polling. + --watch-options-stdin Stop watching when stdin stream has + ended. + --no-hot Negates hot + --no-stats Negates stats + --no-amd Negates amd + --no-bail Negates bail + --no-cache Negates cache + --no-cache-immutable-paths-reset Negates cache-immutable-paths-reset + --no-cache-managed-paths-reset Negates cache-managed-paths-reset + --no-dependencies-reset Negates dependencies-reset + --no-entry-reset Negates entry-reset + --no-experiments-asset Negates experiments-asset + --no-experiments-async-web-assembly Negates experiments-async-web-assembly + --no-experiments-import-async Negates experiments-import-async + --no-experiments-import-await Negates experiments-import-await + --no-experiments-mjs Negates experiments-mjs + --no-experiments-output-module Negates experiments-output-module + --no-experiments-sync-web-assembly Negates experiments-sync-web-assembly + --no-experiments-top-level-await Negates experiments-top-level-await + --no-externals-reset Negates externals-reset + --no-infrastructure-logging-debug-reset Negates infrastructure-logging-debug- + reset + --no-module-expr-context-critical Negates module-expr-context-critical + --no-module-expr-context-recursive Negates module-expr-context-recursive + --no-module-no-parse-reset Negates module-no-parse-reset + --no-module-rules-side-effects Negates module-rules-side-effects + --no-module-rules-reset Negates module-rules-reset + --no-module-strict-export-presence Negates module-strict-export-presence + --no-module-strict-this-context-on-imports Negates module-strict-this-context-on- + imports + --no-module-unknown-context-critical Negates module-unknown-context-critical + --no-module-unknown-context-recursive Negates module-unknown-context-recursive + --no-module-unsafe-cache Negates module-unsafe-cache + --no-module-wrapped-context-critical Negates module-wrapped-context-critical + --no-module-wrapped-context-recursive Negates module-wrapped-context-recursive + --no-node Negates node + --no-node-global Negates node-global + --no-optimization-check-wasm-types Negates optimization-check-wasm-types + --no-optimization-concatenate-modules Negates optimization-concatenate-modules + --no-optimization-emit-on-errors Negates optimization-emit-on-errors + --no-optimization-flag-included-chunks Negates optimization-flag-included- + chunks + --no-optimization-inner-graph Negates optimization-inner-graph + --no-optimization-mangle-exports Negates optimization-mangle-exports + --no-optimization-mangle-wasm-imports Negates optimization-mangle-wasm-imports + --no-optimization-merge-duplicate-chunks Negates optimization-merge-duplicate- + chunks + --no-optimization-minimize Negates optimization-minimize + --no-optimization-portable-records Negates optimization-portable-records + --no-optimization-provided-exports Negates optimization-provided-exports + --no-optimization-remove-available-modules Negates optimization-remove-available- + modules + --no-optimization-remove-empty-chunks Negates optimization-remove-empty-chunks + --no-optimization-side-effects Negates optimization-side-effects + --no-optimization-split-chunks Negates optimization-split-chunks + --no-optimization-split-chunks-hide-path-info Negates optimization-split-chunks-hide- + path-info + --no-optimization-used-exports Negates optimization-used-exports + --no-output-compare-before-emit Negates output-compare-before-emit + --no-output-enabled-library-types-reset Negates output-enabled-library-types- + reset + --no-output-iife Negates output-iife + --no-output-library-reset Negates output-library-reset + --no-output-library-root-reset Negates output-library-root-reset + --no-output-library-export-reset Negates output-library-export-reset + --no-output-library-name-reset Negates output-library-name-reset + --no-output-library-name-root-reset Negates output-library-name-root-reset + --no-output-library-umd-named-define Negates output-library-umd-named-define + --no-output-module Negates output-module + --no-output-pathinfo Negates output-pathinfo + --no-output-strict-module-exception-handling Negates output-strict-module-exception- + handling + --no-performance Negates performance + --no-profile Negates profile + --no-resolve-alias-only-module Negates resolve-alias-only-module + --no-resolve-alias-reset Negates resolve-alias-reset + --no-resolve-alias-fields-reset Negates resolve-alias-fields-reset + --no-resolve-cache Negates resolve-cache + --no-resolve-cache-with-context Negates resolve-cache-with-context + --no-resolve-condition-names-reset Negates resolve-condition-names-reset + --no-resolve-description-files-reset Negates resolve-description-files-reset + --no-resolve-enforce-extension Negates resolve-enforce-extension + --no-resolve-exports-fields-reset Negates resolve-exports-fields-reset + --no-resolve-extensions-reset Negates resolve-extensions-reset + --no-resolve-fully-specified Negates resolve-fully-specified + --no-resolve-main-fields-reset Negates resolve-main-fields-reset + --no-resolve-main-files-reset Negates resolve-main-files-reset + --no-resolve-modules-reset Negates resolve-modules-reset + --no-resolve-restrictions-reset Negates resolve-restrictions-reset + --no-resolve-roots-reset Negates resolve-roots-reset + --no-resolve-symlinks Negates resolve-symlinks + --no-resolve-unsafe-cache Negates resolve-unsafe-cache + --no-resolve-use-sync-file-system-calls Negates resolve-use-sync-file-system- + calls + --no-resolve-loader-alias-only-module Negates resolve-loader-alias-only-module + --no-resolve-loader-alias-reset Negates resolve-loader-alias-reset + --no-resolve-loader-alias-fields-reset Negates resolve-loader-alias-fields- + reset + --no-resolve-loader-cache Negates resolve-loader-cache + --no-resolve-loader-cache-with-context Negates resolve-loader-cache-with- + context + --no-resolve-loader-condition-names-reset Negates resolve-loader-condition-names- + reset + --no-resolve-loader-description-files-reset Negates resolve-loader-description- + files-reset + --no-resolve-loader-enforce-extension Negates resolve-loader-enforce-extension + --no-resolve-loader-exports-fields-reset Negates resolve-loader-exports-fields- + reset + --no-resolve-loader-extensions-reset Negates resolve-loader-extensions-reset + --no-resolve-loader-fully-specified Negates resolve-loader-fully-specified + --no-resolve-loader-main-fields-reset Negates resolve-loader-main-fields-reset + --no-resolve-loader-main-files-reset Negates resolve-loader-main-files-reset + --no-resolve-loader-modules-reset Negates resolve-loader-modules-reset + --no-resolve-loader-restrictions-reset Negates resolve-loader-restrictions- + reset + --no-resolve-loader-roots-reset Negates resolve-loader-roots-reset + --no-resolve-loader-symlinks Negates resolve-loader-symlinks + --no-resolve-loader-unsafe-cache Negates resolve-loader-unsafe-cache + --no-resolve-loader-use-sync-file-system-calls Negates resolve-loader-use-sync-file- + system-calls + --no-stats-all Negates stats-all + --no-stats-assets Negates stats-assets + --no-stats-built-at Negates stats-built-at + --no-stats-cached Negates stats-cached + --no-stats-cached-assets Negates stats-cached-assets + --no-stats-children Negates stats-children + --no-stats-chunk-groups Negates stats-chunk-groups + --no-stats-chunk-modules Negates stats-chunk-modules + --no-stats-chunk-origins Negates stats-chunk-origins + --no-stats-chunk-relations Negates stats-chunk-relations + --no-stats-chunk-root-modules Negates stats-chunk-root-modules + --no-stats-chunks Negates stats-chunks + --no-stats-colors Negates stats-colors + --no-stats-depth Negates stats-depth + --no-stats-entrypoints Negates stats-entrypoints + --no-stats-env Negates stats-env + --no-stats-error-details Negates stats-error-details + --no-stats-error-stack Negates stats-error-stack + --no-stats-errors Negates stats-errors + --no-stats-exclude-assets-reset Negates stats-exclude-assets-reset + --no-stats-exclude-modules-reset Negates stats-exclude-modules-reset + --no-stats-hash Negates stats-hash + --no-stats-ids Negates stats-ids + --no-stats-logging-debug-reset Negates stats-logging-debug-reset + --no-stats-logging-trace Negates stats-logging-trace + --no-stats-module-assets Negates stats-module-assets + --no-stats-module-trace Negates stats-module-trace + --no-stats-modules Negates stats-modules + --no-stats-nested-modules Negates stats-nested-modules + --no-stats-optimization-bailout Negates stats-optimization-bailout + --no-stats-orphan-modules Negates stats-orphan-modules + --no-stats-output-path Negates stats-output-path + --no-stats-performance Negates stats-performance + --no-stats-provided-exports Negates stats-provided-exports + --no-stats-public-path Negates stats-public-path + --no-stats-reasons Negates stats-reasons + --no-stats-runtime Negates stats-runtime + --no-stats-source Negates stats-source + --no-stats-timings Negates stats-timings + --no-stats-used-exports Negates stats-used-exports + --no-stats-version Negates stats-version + --no-stats-warnings Negates stats-warnings + --no-stats-warnings-filter-reset Negates stats-warnings-filter-reset + --no-watch-options-ignored-reset Negates watch-options-ignored-reset + --no-watch-options-stdin Negates watch-options-stdin ``` ## Defaults From 87387f38b734373b0a4eee8c2fd5e3dd07ec134c Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Thu, 23 Jul 2020 19:02:29 +0530 Subject: [PATCH 12/21] tests: module-rules-* --- test/core-flags/module-flags.test.js | 29 ++++++++++++++++++++++++---- test/core-flags/webpack.config.js | 3 ++- 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/test/core-flags/module-flags.test.js b/test/core-flags/module-flags.test.js index 412670300dd..be8ad635b28 100644 --- a/test/core-flags/module-flags.test.js +++ b/test/core-flags/module-flags.test.js @@ -8,18 +8,23 @@ const moduleFlags = flagsFromCore.filter(({ name }) => name.startsWith('module-' describe('module config related flag', () => { moduleFlags.forEach((flag) => { // extract property name from flag name - const property = flag.name.split('module-')[1]; + let property = flag.name.split('module-')[1]; + if (property.includes('rules-') && property !== 'rules-reset') { + property = flag.name.split('rules-')[1]; + } const propName = hyphenToUpperCase(property); //TODO: improve webpackCLITestPlugin for testing of nested options // i.e, module-rules-* flags, right now it logs rules: [Object] only. - if (flag.type === Boolean && !flag.name.includes('rules-') && !flag.name.includes('module-no-parse')) { + if (flag.type === Boolean && !flag.name.includes('module-no-parse')) { it(`should config --${flag.name} correctly`, () => { const { stderr, stdout } = run(__dirname, [`--${flag.name}`]); expect(stderr).toBeFalsy(); if (flag.name.includes('-reset')) { const option = propName.split('Reset')[0]; expect(stdout).toContain(`${option}: []`); + } else if (flag.name.includes('rules-')) { + expect(stdout).toContain('sideEffects: true'); } else { expect(stdout).toContain(`${propName}: true`); } @@ -31,21 +36,37 @@ describe('module config related flag', () => { if (flag.name.includes('-reset')) { const option = propName.split('Reset')[0]; expect(stdout).toContain(`${option}: []`); + } else if (flag.name.includes('rules-')) { + expect(stdout).toContain('sideEffects: false'); } else { expect(stdout).toContain(`${propName}: false`); } }); } - if (flag.type === String && !flag.name.includes('rules-')) { + if (flag.type === String) { it(`should config --${flag.name} correctly`, () => { let { stderr, stdout } = run(__dirname, [`--${flag.name}`, 'value']); - expect(stderr).toBeFalsy(); if (flag.name === 'module-no-parse') { + expect(stderr).toBeFalsy(); expect(stdout).toContain('value'); } else if (flag.name.includes('reg-exp')) { stdout = run(__dirname, [`--${flag.name}`, '/ab?c*/']).stdout; + expect(stderr).toBeFalsy(); expect(stdout).toContain(`${propName}: /ab?c*/`); + } else if (flag.name.includes('module-rules-')) { + stdout = run(__dirname, [`--${flag.name}`, 'javascript/auto']).stdout; + if (propName === 'use' || propName === 'type') { + expect(stdout).toContain(`${propName}: 'javascript/auto'`); + } else if (property.includes('use-')) { + expect(stdout).toContain(`use: [Object]`); + } else if (propName === 'enforce') { + stdout = run(__dirname, [`--${flag.name}`, 'pre', '--module-rules-use-loader', 'myLoader']).stdout; + expect(stdout).toContain(`${propName}: 'pre'`); + } else { + stdout = run(__dirname, [`--${flag.name}`, '/rules-value']).stdout; + expect(stdout).toContain('rules-value'); + } } else { expect(stdout).toContain(`${propName}: 'value'`); } diff --git a/test/core-flags/webpack.config.js b/test/core-flags/webpack.config.js index b36297d5cd8..f753d90b255 100644 --- a/test/core-flags/webpack.config.js +++ b/test/core-flags/webpack.config.js @@ -3,5 +3,6 @@ const WebpackCLITestPlugin = require('../utils/webpack-cli-test-plugin'); module.exports = { entry: './main.js', mode: 'development', - plugins: [new WebpackCLITestPlugin()], + name: 'compiler', + plugins: [new WebpackCLITestPlugin(['module'])], }; From d57bb4dbc273abfbc96dee66a970e76e3355e424 Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Fri, 24 Jul 2020 15:52:34 +0530 Subject: [PATCH 13/21] docs: reduce spaces --- packages/webpack-cli/README.md | 1527 +++++++++++++------------------- 1 file changed, 599 insertions(+), 928 deletions(-) diff --git a/packages/webpack-cli/README.md b/packages/webpack-cli/README.md index 520337725bb..a2d080cdbf0 100644 --- a/packages/webpack-cli/README.md +++ b/packages/webpack-cli/README.md @@ -22,19 +22,20 @@ yarn add webpack-cli --dev ## Supported arguments and commands -``` - -Available Commands +### Available Commands +``` init Initialize a new webpack configuration migrate Migrate a configuration to a new version loader Scaffold a loader repository plugin Scaffold a plugin repository info Outputs information about your system and dependencies serve Run the webpack Dev Server +``` -Options (for webpack 4) +### webpack 4 +``` --entry string[] The entry point(s) of your application. -c, --config string Provide path to a webpack configuration file -m, --merge string Merge a configuration file using webpack-merge @@ -55,932 +56,602 @@ Options (for webpack 4) --stats string It instructs webpack on how to treat the stats --no-stats Disables stats output --verbose It tells webpack to output all the information +``` - Options (for webpack 5) +### webpack 5 - --amd You can pass `false` to disable AMD - support. - --bail Report the first error as a hard error - instead of tolerating it. - --cache Enable in memory caching. Disable - caching. - --cache-immutable-paths string[] A path to a immutable directory (usually - a package manager cache directory). - --cache-immutable-paths-reset Clear all items provided in - configuration. List of paths that are - managed by a package manager and contain - a version or hash in its path so all - files are immutable. - --cache-managed-paths string[] A path to a managed directory (usually a - node_modules directory). - --cache-managed-paths-reset Clear all items provided in - configuration. List of paths that are - managed by a package manager and can be - trusted to not be modified otherwise. - --cache-type string In memory caching. Filesystem caching. - --cache-cache-directory string Base directory for the cache (defaults - to node_modules/.cache/webpack). - --cache-cache-location string Locations for the cache (defaults to - cacheDirectory / name). - --cache-hash-algorithm string Algorithm used for generation the hash - (see node.js crypto package). - --cache-idle-timeout number Time in ms after which idle period the - cache storing should happen (only for - store: 'pack' or 'idle'). - --cache-idle-timeout-for-initial-store number Time in ms after which idle period the - initial cache storing should happen - (only for store: 'pack' or 'idle'). - --cache-name string Name for the cache. Different names will - lead to different coexisting caches. - --cache-store string When to store data to the filesystem. - (pack: Store data when compiler is idle - in a single file). - --cache-version string Version of the cache data. Different - versions won't allow to reuse the cache - and override existing content. Update - the version when config changed in a way - which doesn't allow to reuse cache. - This will invalidate the cache. - --context string The base directory (absolute path!) for - resolving the `entry` option. If - `output.pathinfo` is set, the included - pathinfo is shortened to this directory. - --dependencies string[] References to another configuration to - depend on. - --dependencies-reset Clear all items provided in - configuration. References to other - configurations to depend on. - --devtool string A developer tool to enhance debugging - (false | eval | - [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map). - --entry-reset Clear all items provided in - configuration. All modules are loaded - upon startup. The last one is exported. - --experiments-asset Allow module type 'asset' to generate - assets. - --experiments-async-web-assembly Support WebAssembly as asynchronous - EcmaScript Module. - --experiments-import-async Allow 'import/export' syntax to import - async modules. - --experiments-import-await Allow 'import/export await' syntax to - import async modules. - --experiments-mjs Support .mjs files as way to define - strict ESM file (node.js). - --experiments-output-module Allow output javascript files as module - source type. - --experiments-sync-web-assembly Support WebAssembly as synchronous - EcmaScript Module (outdated). - --experiments-top-level-await Allow using top-level-await in - EcmaScript Modules. - --externals string[] Every matched dependency becomes - external. An exact matched dependency - becomes external. The same string is - used as external dependency. - --externals-reset Clear all items provided in - configuration. Specify dependencies that - shouldn't be resolved by webpack, but - should become dependencies of the - resulting bundle. The kind of the - dependency depends on - `output.libraryTarget`. - --externals-type string Specifies the default type of externals - ('amd*', 'umd*', 'system' and 'jsonp' - depend on output.libraryTarget set to - the same value). - --infrastructure-logging-debug string[] Enable/Disable debug logging for all - loggers. Enable debug logging for - specific loggers. - --infrastructure-logging-debug-reset Clear all items provided in - configuration. Enable debug logging for - specific loggers. - --infrastructure-logging-level string Log level. - --module-expr-context-critical Enable warnings for full dynamic - dependencies. - --module-expr-context-recursive Enable recursive directory lookup for - full dynamic dependencies. - --module-expr-context-reg-exp string Sets the default regular expression for - full dynamic dependencies. - --module-expr-context-request string Set the default request for full dynamic - dependencies. - --module-no-parse string[] A regular expression, when matched the - module is not parsed. An absolute path, - when the module starts with this path it - is not parsed. - --module-no-parse-reset Clear all items provided in - configuration. Don't parse files - matching. It's matched against the full - resolved request. - --module-rules-compiler string[] Match the child compiler name. - --module-rules-enforce string[] Enforce this rule as pre or post step. - --module-rules-exclude string[] Shortcut for resource.exclude. - --module-rules-include string[] Shortcut for resource.include. - --module-rules-issuer string[] Match the issuer of the module (The - module pointing to this module). - --module-rules-loader string[] A loader request. - --module-rules-mimetype string[] Match module mimetype when load from - Data URI. - --module-rules-options string[] Options passed to a loader. - --module-rules-real-resource string[] Match the real resource path of the - module. - --module-rules-resource string[] Match the resource path of the module. - --module-rules-resource-fragment string[] Match the resource fragment of the - module. - --module-rules-resource-query string[] Match the resource query of the module. - --module-rules-side-effects Flags a module as with or without side - effects. - --module-rules-test string[] Shortcut for resource.test. - --module-rules-type string[] Module type to use for the module. - --module-rules-use-ident string[] Unique loader options identifier. - --module-rules-use-loader string[] A loader request. - --module-rules-use-options string[] Options passed to a loader. - --module-rules-use string[] A loader request. - --module-rules-reset Clear all items provided in - configuration. A list of rules. - --module-strict-export-presence Emit errors instead of warnings when - imported names don't exist in imported - module. - --module-strict-this-context-on-imports Handle the this context correctly - according to the spec for namespace - objects. - --module-unknown-context-critical Enable warnings when using the require - function in a not statically analyse- - able way. - --module-unknown-context-recursive Enable recursive directory lookup when - using the require function in a not - statically analyse-able way. - --module-unknown-context-reg-exp string Sets the regular expression when using - the require function in a not statically - analyse-able way. - --module-unknown-context-request string Sets the request when using the require - function in a not statically analyse- - able way. - --module-unsafe-cache Cache the resolving of module requests. - --module-wrapped-context-critical Enable warnings for partial dynamic - dependencies. - --module-wrapped-context-recursive Enable recursive directory lookup for - partial dynamic dependencies. - --module-wrapped-context-reg-exp string Set the inner regular expression for - partial dynamic dependencies. - --name string Name of the configuration. Used when - loading multiple configurations. - --node Include polyfills or mocks for various - node stuff. - --node-dirname string Include a polyfill for the '__dirname' - variable. - --node-filename string Include a polyfill for the '__filename' - variable. - --node-global Include a polyfill for the 'global' - variable. - --optimization-check-wasm-types Check for incompatible wasm types when - importing/exporting from/to ESM. - --optimization-chunk-ids string Define the algorithm to choose chunk ids - (named: readable ids for better - debugging, deterministic: numeric hash - ids for better long term caching, size: - numeric ids focused on minimal initial - download size, total-size: numeric ids - focused on minimal total download size, - false: no algorithm used, as custom one - can be provided via plugin). - --optimization-concatenate-modules Concatenate modules when possible to - generate less modules, more efficient - code and enable more optimizations by - the minimizer. - --optimization-emit-on-errors Emit assets even when errors occur. - Critical errors are emitted into the - generated code and will case errors at - runtime. - --optimization-flag-included-chunks Also flag chunks as loaded which contain - a subset of the modules. - --optimization-inner-graph Creates a module-internal dependency - graph for top level symbols, exports and - imports, to improve unused exports - detection. - --optimization-mangle-exports Rename exports when possible to generate - shorter code (depends on - optimization.usedExports and - optimization.providedExports). - --optimization-mangle-wasm-imports Reduce size of WASM by changing imports - to shorter strings. - --optimization-merge-duplicate-chunks Merge chunks which contain the same - modules. - --optimization-minimize Enable minimizing the output. Uses - optimization.minimizer. - --optimization-module-ids string Define the algorithm to choose module - ids (natural: numeric ids in order of - usage, named: readable ids for better - debugging, hashed: (deprecated) short - hashes as ids for better long term - caching, deterministic: numeric hash ids - for better long term caching, size: - numeric ids focused on minimal initial - download size, false: no algorithm used, - as custom one can be provided via - plugin). - --optimization-node-env string Set process.env.NODE_ENV to a specific - value. - --optimization-portable-records Generate records with relative paths to - be able to move the context folder. - --optimization-provided-exports Figure out which exports are provided by - modules to generate more efficient - code. - --optimization-remove-available-modules Removes modules from chunks when these - modules are already included in all - parents. - --optimization-remove-empty-chunks Remove chunks which are empty. - --optimization-runtime-chunk string Create an additional chunk which - contains only the webpack runtime and - chunk hash maps. - --optimization-runtime-chunk-name string The name or name factory for the runtime - chunks. - --optimization-side-effects Skip over modules which are flagged to - contain no side effects when exports are - not used. - --optimization-split-chunks Optimize duplication and caching by - splitting chunks by shared modules and - cache group. - --optimization-split-chunks-automatic-name-delimiter string Sets the name delimiter for created - chunks. - --optimization-split-chunks-chunks string Select chunks for determining shared - modules (defaults to "async", "initial" - and "all" requires adding these chunks - to the HTML). - --optimization-split-chunks-enforce-size-threshold number Size of the javascript part of the - chunk. - --optimization-split-chunks-fallback-cache-group-automatic-name-delimiter string Sets the name delimiter for created - chunks. - --optimization-split-chunks-fallback-cache-group-max-async-size number Size of the javascript part of the - chunk. - --optimization-split-chunks-fallback-cache-group-max-initial-size number Size of the javascript part of the - chunk. - --optimization-split-chunks-fallback-cache-group-max-size number Size of the javascript part of the - chunk. - --optimization-split-chunks-fallback-cache-group-min-size number Size of the javascript part of the - chunk. - --optimization-split-chunks-filename string Sets the template for the filename for - created chunks. - --optimization-split-chunks-hide-path-info Prevents exposing path info when - creating names for parts splitted by - maxSize. - --optimization-split-chunks-max-async-requests number Maximum number of requests which are - accepted for on-demand loading. - --optimization-split-chunks-max-async-size number Size of the javascript part of the - chunk. - --optimization-split-chunks-max-initial-requests number Maximum number of initial chunks which - are accepted for an entry point. - --optimization-split-chunks-max-initial-size number Size of the javascript part of the - chunk. - --optimization-split-chunks-max-size number Size of the javascript part of the - chunk. - --optimization-split-chunks-min-chunks number Minimum number of times a module has to - be duplicated until it's considered for - splitting. - --optimization-split-chunks-min-remaining-size number Size of the javascript part of the - chunk. - --optimization-split-chunks-min-size number Size of the javascript part of the - chunk. - --optimization-split-chunks-name string Give chunks created a name (chunks with - equal name are merged). - --optimization-used-exports Figure out which exports are used by - modules to mangle export names, omit - unused exports and generate more - efficient code. - --output-asset-module-filename string The filename of asset modules as - relative path inside the `output.path` - directory. - --output-chunk-callback-name string The callback function name used by - webpack for loading of chunks in - WebWorkers. - --output-chunk-filename string The filename of non-entry chunks as - relative path inside the `output.path` - directory. - --output-chunk-load-timeout number Number of milliseconds before chunk - request expires. - --output-compare-before-emit Check if to be emitted file already - exists and have the same content before - writing to output filesystem. - --output-cross-origin-loading string This option enables cross-origin loading - of chunks. - --output-devtool-fallback-module-filename-template string Similar to - `output.devtoolModuleFilenameTemplate`, - but used in the case of duplicate module - identifiers. - --output-devtool-module-filename-template string Filename template string of function for - the sources array in a generated - SourceMap. - --output-devtool-namespace string Module namespace to use when - interpolating filename template string - for the sources array in a generated - SourceMap. Defaults to `output.library` - if not set. It's useful for avoiding - runtime collisions in sourcemaps from - multiple webpack projects built as - libraries. - --output-ecma-version number The maximum EcmaScript version of the - webpack generated code (doesn't include - input source code from modules). - --output-enabled-library-types string[] Type of library. - --output-enabled-library-types-reset Clear all items provided in - configuration. List of library types - enabled for use by entry points. - --output-filename string Specifies the name of each output file - on disk. You must **not** specify an - absolute path here! The `output.path` - option determines the location on disk - the files are written to, filename is - used solely for naming the individual - files. - --output-global-object string An expression which is used to address - the global object/scope in runtime code. - --output-hash-digest string Digest type used for the hash. - --output-hash-digest-length number Number of chars which are used for the - hash. - --output-hash-function string Algorithm used for generation the hash - (see node.js crypto package). - --output-hash-salt string Any string which is added to the hash to - salt it. - --output-hot-update-chunk-filename string The filename of the Hot Update Chunks. - They are inside the output.path - directory. - --output-hot-update-function string The JSONP function used by webpack for - async loading of hot update chunks. - --output-hot-update-main-filename string The filename of the Hot Update Main - File. It is inside the `output.path` - directory. - --output-iife Wrap javascript code into IIFE's to - avoid leaking into global scope. - --output-import-function-name string The name of the native import() function - (can be exchanged for a polyfill). - --output-jsonp-function string The JSONP function used by webpack for - async loading of chunks. - --output-library string[] A part of the library name. - --output-library-reset Clear all items provided in - configuration. The name of the library - (some types allow unnamed libraries - too). - --output-library-amd string Name of the exposed AMD library in the - UMD. - --output-library-commonjs string Name of the exposed commonjs export in - the UMD. - --output-library-root string[] Part of the name of the property exposed - globally by a UMD library. - --output-library-root-reset Clear all items provided in - configuration. Name of the property - exposed globally by a UMD library. - --output-library-auxiliary-comment string Append the same comment above each - import style. - --output-library-auxiliary-comment-amd string Set comment for `amd` section in UMD. - --output-library-auxiliary-comment-commonjs string Set comment for `commonjs` (exports) - section in UMD. - --output-library-auxiliary-comment-commonjs2 string Set comment for `commonjs2` - (module.exports) section in UMD. - --output-library-auxiliary-comment-root string Set comment for `root` (global variable) - section in UMD. - --output-library-export string[] Part of the export that should be - exposed as library. - --output-library-export-reset Clear all items provided in - configuration. Specify which export - should be exposed as library. - --output-library-name string[] A part of the library name. - --output-library-name-reset Clear all items provided in - configuration. The name of the library - (some types allow unnamed libraries - too). - --output-library-name-amd string Name of the exposed AMD library in the - UMD. - --output-library-name-commonjs string Name of the exposed commonjs export in - the UMD. - --output-library-name-root string[] Part of the name of the property exposed - globally by a UMD library. - --output-library-name-root-reset Clear all items provided in - configuration. Name of the property - exposed globally by a UMD library. - --output-library-type string Type of library. - --output-library-umd-named-define If `output.libraryTarget` is set to umd - and `output.library` is set, setting - this to true will name the AMD module. - --output-module Output javascript files as module source - type. - --output-path string The output directory as **absolute - path** (required). - --output-pathinfo Include comments with information about - the modules. - --output-public-path string The `publicPath` specifies the public - URL address of the output files when - referenced in a browser. - --output-script-type string This option enables loading async chunks - via a custom script type, such as - script type="module". - --output-source-map-filename string The filename of the SourceMaps for the - JavaScript files. They are inside the - `output.path` directory. - --output-source-prefix string Prefixes every line of the source in the - bundle with this string. - --output-strict-module-exception-handling Handles exceptions in module loading - correctly at a performance cost. - --output-unique-name string A unique name of the webpack build to - avoid multiple webpack runtimes to - conflict when using globals. - --output-webassembly-module-filename string The filename of WebAssembly modules as - relative path inside the `output.path` - directory. - --parallelism number The number of parallel processed modules - in the compilation. - --performance Configuration for web performance - recommendations. - --performance-hints string Sets the format of the hints: warnings, - errors or nothing at all. - --performance-max-asset-size number File size limit (in bytes) when - exceeded, that webpack will provide - performance hints. - --performance-max-entrypoint-size number Total size of an entry point (in bytes). - --profile Capture timing information for each - module. - --records-input-path string Store compiler state to a json file. - --records-output-path string Load compiler state from a json file. - --records-path string Store/Load compiler state from/to a json - file. This will result in persistent - ids of modules and chunks. An absolute - path is expected. `recordsPath` is used - for `recordsInputPath` and - `recordsOutputPath` if they left - undefined. - --resolve-alias-alias string[] Ignore request (replace with empty - module). New request. - --resolve-alias-name string[] Request to be redirected. - --resolve-alias-only-module Redirect only exact matching request. - --resolve-alias-reset Clear all items provided in - configuration. Redirect module requests. - --resolve-alias-fields string[] Field in the description file (usually - package.json) which are used to redirect - requests inside the module. - --resolve-alias-fields-reset Clear all items provided in - configuration. Fields in the description - file (usually package.json) which are - used to redirect requests inside the - module. - --resolve-cache Enable caching of successfully resolved - requests (cache entries are - revalidated). - --resolve-cache-with-context Include the context information in the - cache identifier when caching. - --resolve-condition-names string[] Condition names for exports field entry - point. - --resolve-condition-names-reset Clear all items provided in - configuration. Condition names for - exports field entry point. - --resolve-description-files string[] Filename used to find a description file - (like a package.json). - --resolve-description-files-reset Clear all items provided in - configuration. Filenames used to find a - description file (like a package.json). - --resolve-enforce-extension Enforce the resolver to use one of the - extensions from the extensions option - (User must specify requests without - extension). - --resolve-exports-fields string[] Field name from the description file - (usually package.json) which is used to - provide entry points of a package. - --resolve-exports-fields-reset Clear all items provided in - configuration. Field names from the - description file (usually package.json) - which are used to provide entry points - of a package. - --resolve-extensions string[] Extension added to the request when - trying to find the file. - --resolve-extensions-reset Clear all items provided in - configuration. Extensions added to the - request when trying to find the file. - --resolve-fully-specified Treats the request specified by the user - as fully specified, meaning no - extensions are added and the mainFiles - in directories are not resolved (This - doesn't affect requests from mainFields, - aliasFields or aliases). - --resolve-main-fields string[] Field name from the description file - (package.json) which are used to find - the default entry point. - --resolve-main-fields-reset Clear all items provided in - configuration. Field names from the - description file (package.json) which - are used to find the default entry - point. - --resolve-main-files string[] Filename used to find the default entry - point if there is no description file or - main field. - --resolve-main-files-reset Clear all items provided in - configuration. Filenames used to find - the default entry point if there is no - description file or main field. - --resolve-modules string[] Folder name or directory path where to - find modules. - --resolve-modules-reset Clear all items provided in - configuration. Folder names or directory - paths where to find modules. - --resolve-restrictions string[] Resolve restriction. Resolve result must - fulfill this restriction. - --resolve-restrictions-reset Clear all items provided in - configuration. A list of resolve - restrictions. Resolve results must - fulfill all of these restrictions to - resolve successfully. Other resolve - paths are taken when restrictions are - not met. - --resolve-roots string[] Directory in which requests that are - server-relative URLs (starting with '/') - are resolved. - --resolve-roots-reset Clear all items provided in - configuration. A list of directories in - which requests that are server-relative - URLs (starting with '/') are resolved. - On non-windows system these requests are - tried to resolve as absolute path - first. - --resolve-symlinks Enable resolving symlinks to the - original location. - --resolve-unsafe-cache Enable caching of successfully resolved - requests (cache entries are not - revalidated). - --resolve-use-sync-file-system-calls Use synchronous filesystem calls for the - resolver. - --resolve-loader-alias-alias string[] Ignore request (replace with empty - module). New request. - --resolve-loader-alias-name string[] Request to be redirected. - --resolve-loader-alias-only-module Redirect only exact matching request. - --resolve-loader-alias-reset Clear all items provided in - configuration. Redirect module requests. - --resolve-loader-alias-fields string[] Field in the description file (usually - package.json) which are used to redirect - requests inside the module. - --resolve-loader-alias-fields-reset Clear all items provided in - configuration. Fields in the description - file (usually package.json) which are - used to redirect requests inside the - module. - --resolve-loader-cache Enable caching of successfully resolved - requests (cache entries are - revalidated). - --resolve-loader-cache-with-context Include the context information in the - cache identifier when caching. - --resolve-loader-condition-names string[] Condition names for exports field entry - point. - --resolve-loader-condition-names-reset Clear all items provided in - configuration. Condition names for - exports field entry point. - --resolve-loader-description-files string[] Filename used to find a description file - (like a package.json). - --resolve-loader-description-files-reset Clear all items provided in - configuration. Filenames used to find a - description file (like a package.json). - --resolve-loader-enforce-extension Enforce the resolver to use one of the - extensions from the extensions option - (User must specify requests without - extension). - --resolve-loader-exports-fields string[] Field name from the description file - (usually package.json) which is used to - provide entry points of a package. - --resolve-loader-exports-fields-reset Clear all items provided in - configuration. Field names from the - description file (usually package.json) - which are used to provide entry points - of a package. - --resolve-loader-extensions string[] Extension added to the request when - trying to find the file. - --resolve-loader-extensions-reset Clear all items provided in - configuration. Extensions added to the - request when trying to find the file. - --resolve-loader-fully-specified Treats the request specified by the user - as fully specified, meaning no - extensions are added and the mainFiles - in directories are not resolved (This - doesn't affect requests from mainFields, - aliasFields or aliases). - --resolve-loader-main-fields string[] Field name from the description file - (package.json) which are used to find - the default entry point. - --resolve-loader-main-fields-reset Clear all items provided in - configuration. Field names from the - description file (package.json) which - are used to find the default entry - point. - --resolve-loader-main-files string[] Filename used to find the default entry - point if there is no description file or - main field. - --resolve-loader-main-files-reset Clear all items provided in - configuration. Filenames used to find - the default entry point if there is no - description file or main field. - --resolve-loader-modules string[] Folder name or directory path where to - find modules. - --resolve-loader-modules-reset Clear all items provided in - configuration. Folder names or directory - paths where to find modules. - --resolve-loader-restrictions string[] Resolve restriction. Resolve result must - fulfill this restriction. - --resolve-loader-restrictions-reset Clear all items provided in - configuration. A list of resolve - restrictions. Resolve results must - fulfill all of these restrictions to - resolve successfully. Other resolve - paths are taken when restrictions are - not met. - --resolve-loader-roots string[] Directory in which requests that are - server-relative URLs (starting with '/') - are resolved. - --resolve-loader-roots-reset Clear all items provided in - configuration. A list of directories in - which requests that are server-relative - URLs (starting with '/') are resolved. - On non-windows system these requests are - tried to resolve as absolute path - first. - --resolve-loader-symlinks Enable resolving symlinks to the - original location. - --resolve-loader-unsafe-cache Enable caching of successfully resolved - requests (cache entries are not - revalidated). - --resolve-loader-use-sync-file-system-calls Use synchronous filesystem calls for the - resolver. - --stats-all Fallback value for stats options when an - option is not defined (has precedence - over local webpack defaults). - --stats-assets Add assets information. - --stats-assets-sort string Sort the assets by that field. - --stats-built-at Add built at time information. - --stats-cached Add information about cached (not built) - modules. - --stats-cached-assets Show cached assets (setting this to - `false` only shows emitted files). - --stats-children Add children information. - --stats-chunk-groups Display all chunk groups with the - corresponding bundles. - --stats-chunk-modules Add built modules information to chunk - information. - --stats-chunk-origins Add the origins of chunks and chunk - merging info. - --stats-chunk-relations Add information about parent, children - and sibling chunks to chunk information. - --stats-chunk-root-modules Add root modules information to chunk - information. - --stats-chunks Add chunk information. - --stats-chunks-sort string Sort the chunks by that field. - --stats-colors Enables/Disables colorful output. - --stats-colors-bold string Custom color for bold text. - --stats-colors-cyan string Custom color for cyan text. - --stats-colors-green string Custom color for green text. - --stats-colors-magenta string Custom color for magenta text. - --stats-colors-red string Custom color for red text. - --stats-colors-yellow string Custom color for yellow text. - --stats-context string Context directory for request - shortening. - --stats-depth Add module depth in module graph. - --stats-entrypoints Display the entry points with the - corresponding bundles. - --stats-env Add --env information. - --stats-error-details Add details to errors (like resolving - log). - --stats-error-stack Add internal stack trace to errors. - --stats-errors Add errors. - --stats-exclude-assets string[] Suppress assets that match the specified - filters. Filters can be Strings, - RegExps or Functions. - --stats-exclude-assets-reset Clear all items provided in - configuration. Suppress assets that - match the specified filters. Filters can - be Strings, RegExps or Functions. - --stats-exclude-modules string[] Suppress modules that match the - specified filters. Filters can be - Strings, RegExps, Booleans or Functions. - --stats-exclude-modules-reset Clear all items provided in - configuration. Suppress modules that - match the specified filters. Filters can - be Strings, RegExps, Booleans or - Functions. - --stats-hash Add the hash of the compilation. - --stats-ids Add ids. - --stats-logging string Specify log level of logging output. - Enable/disable logging output (`true`: - shows normal logging output, loglevel: - log). - --stats-logging-debug string[] Enable/Disable debug logging for all - loggers. Include debug logging of - specified loggers (i. e. for plugins or - loaders). Filters can be Strings, - RegExps or Functions. - --stats-logging-debug-reset Clear all items provided in - configuration. Include debug logging of - specified loggers (i. e. for plugins or - loaders). Filters can be Strings, - RegExps or Functions. - --stats-logging-trace Add stack traces to logging output. - --stats-max-modules number Set the maximum number of modules to be - shown. - --stats-module-assets Add information about assets inside - modules. - --stats-module-trace Add dependencies and origin of - warnings/errors. - --stats-modules Add built modules information. - --stats-modules-sort string Sort the modules by that field. - --stats-nested-modules Add information about modules nested in - other modules (like with module - concatenation). - --stats-optimization-bailout Show reasons why optimization bailed out - for modules. - --stats-orphan-modules Add information about orphan modules. - --stats-output-path Add output path information. - --stats-performance Add performance hint flags. - --stats-preset string Preset for the default values. - --stats-provided-exports Show exports provided by modules. - --stats-public-path Add public path information. - --stats-reasons Add information about the reasons why - modules are included. - --stats-runtime Add information about runtime modules. - --stats-source Add the source code of modules. - --stats-timings Add timing information. - --stats-used-exports Show exports used by modules. - --stats-version Add webpack version information. - --stats-warnings Add warnings. - --stats-warnings-filter string[] Suppress warnings that match the - specified filters. Filters can be - Strings, RegExps or Functions. - --stats-warnings-filter-reset Clear all items provided in - configuration. Suppress warnings that - match the specified filters. Filters can - be Strings, RegExps or Functions. - --watch-options-aggregate-timeout number Delay the rebuilt after the first - change. Value is a time in ms. - --watch-options-ignored string[] A glob pattern for files that should be - ignored from watching. - --watch-options-ignored-reset Clear all items provided in - configuration. Ignore some files from - watching (glob pattern). - --watch-options-poll string `number`: use polling with specified - interval. `true`: use polling. - --watch-options-stdin Stop watching when stdin stream has - ended. - --no-hot Negates hot - --no-stats Negates stats - --no-amd Negates amd - --no-bail Negates bail - --no-cache Negates cache - --no-cache-immutable-paths-reset Negates cache-immutable-paths-reset - --no-cache-managed-paths-reset Negates cache-managed-paths-reset - --no-dependencies-reset Negates dependencies-reset - --no-entry-reset Negates entry-reset - --no-experiments-asset Negates experiments-asset - --no-experiments-async-web-assembly Negates experiments-async-web-assembly - --no-experiments-import-async Negates experiments-import-async - --no-experiments-import-await Negates experiments-import-await - --no-experiments-mjs Negates experiments-mjs - --no-experiments-output-module Negates experiments-output-module - --no-experiments-sync-web-assembly Negates experiments-sync-web-assembly - --no-experiments-top-level-await Negates experiments-top-level-await - --no-externals-reset Negates externals-reset - --no-infrastructure-logging-debug-reset Negates infrastructure-logging-debug- - reset - --no-module-expr-context-critical Negates module-expr-context-critical - --no-module-expr-context-recursive Negates module-expr-context-recursive - --no-module-no-parse-reset Negates module-no-parse-reset - --no-module-rules-side-effects Negates module-rules-side-effects - --no-module-rules-reset Negates module-rules-reset - --no-module-strict-export-presence Negates module-strict-export-presence - --no-module-strict-this-context-on-imports Negates module-strict-this-context-on- - imports - --no-module-unknown-context-critical Negates module-unknown-context-critical - --no-module-unknown-context-recursive Negates module-unknown-context-recursive - --no-module-unsafe-cache Negates module-unsafe-cache - --no-module-wrapped-context-critical Negates module-wrapped-context-critical - --no-module-wrapped-context-recursive Negates module-wrapped-context-recursive - --no-node Negates node - --no-node-global Negates node-global - --no-optimization-check-wasm-types Negates optimization-check-wasm-types - --no-optimization-concatenate-modules Negates optimization-concatenate-modules - --no-optimization-emit-on-errors Negates optimization-emit-on-errors - --no-optimization-flag-included-chunks Negates optimization-flag-included- - chunks - --no-optimization-inner-graph Negates optimization-inner-graph - --no-optimization-mangle-exports Negates optimization-mangle-exports - --no-optimization-mangle-wasm-imports Negates optimization-mangle-wasm-imports - --no-optimization-merge-duplicate-chunks Negates optimization-merge-duplicate- - chunks - --no-optimization-minimize Negates optimization-minimize - --no-optimization-portable-records Negates optimization-portable-records - --no-optimization-provided-exports Negates optimization-provided-exports - --no-optimization-remove-available-modules Negates optimization-remove-available- - modules - --no-optimization-remove-empty-chunks Negates optimization-remove-empty-chunks - --no-optimization-side-effects Negates optimization-side-effects - --no-optimization-split-chunks Negates optimization-split-chunks - --no-optimization-split-chunks-hide-path-info Negates optimization-split-chunks-hide- - path-info - --no-optimization-used-exports Negates optimization-used-exports - --no-output-compare-before-emit Negates output-compare-before-emit - --no-output-enabled-library-types-reset Negates output-enabled-library-types- - reset - --no-output-iife Negates output-iife - --no-output-library-reset Negates output-library-reset - --no-output-library-root-reset Negates output-library-root-reset - --no-output-library-export-reset Negates output-library-export-reset - --no-output-library-name-reset Negates output-library-name-reset - --no-output-library-name-root-reset Negates output-library-name-root-reset - --no-output-library-umd-named-define Negates output-library-umd-named-define - --no-output-module Negates output-module - --no-output-pathinfo Negates output-pathinfo - --no-output-strict-module-exception-handling Negates output-strict-module-exception- - handling - --no-performance Negates performance - --no-profile Negates profile - --no-resolve-alias-only-module Negates resolve-alias-only-module - --no-resolve-alias-reset Negates resolve-alias-reset - --no-resolve-alias-fields-reset Negates resolve-alias-fields-reset - --no-resolve-cache Negates resolve-cache - --no-resolve-cache-with-context Negates resolve-cache-with-context - --no-resolve-condition-names-reset Negates resolve-condition-names-reset - --no-resolve-description-files-reset Negates resolve-description-files-reset - --no-resolve-enforce-extension Negates resolve-enforce-extension - --no-resolve-exports-fields-reset Negates resolve-exports-fields-reset - --no-resolve-extensions-reset Negates resolve-extensions-reset - --no-resolve-fully-specified Negates resolve-fully-specified - --no-resolve-main-fields-reset Negates resolve-main-fields-reset - --no-resolve-main-files-reset Negates resolve-main-files-reset - --no-resolve-modules-reset Negates resolve-modules-reset - --no-resolve-restrictions-reset Negates resolve-restrictions-reset - --no-resolve-roots-reset Negates resolve-roots-reset - --no-resolve-symlinks Negates resolve-symlinks - --no-resolve-unsafe-cache Negates resolve-unsafe-cache - --no-resolve-use-sync-file-system-calls Negates resolve-use-sync-file-system- - calls - --no-resolve-loader-alias-only-module Negates resolve-loader-alias-only-module - --no-resolve-loader-alias-reset Negates resolve-loader-alias-reset - --no-resolve-loader-alias-fields-reset Negates resolve-loader-alias-fields- - reset - --no-resolve-loader-cache Negates resolve-loader-cache - --no-resolve-loader-cache-with-context Negates resolve-loader-cache-with- - context - --no-resolve-loader-condition-names-reset Negates resolve-loader-condition-names- - reset - --no-resolve-loader-description-files-reset Negates resolve-loader-description- - files-reset - --no-resolve-loader-enforce-extension Negates resolve-loader-enforce-extension - --no-resolve-loader-exports-fields-reset Negates resolve-loader-exports-fields- - reset - --no-resolve-loader-extensions-reset Negates resolve-loader-extensions-reset - --no-resolve-loader-fully-specified Negates resolve-loader-fully-specified - --no-resolve-loader-main-fields-reset Negates resolve-loader-main-fields-reset - --no-resolve-loader-main-files-reset Negates resolve-loader-main-files-reset - --no-resolve-loader-modules-reset Negates resolve-loader-modules-reset - --no-resolve-loader-restrictions-reset Negates resolve-loader-restrictions- - reset - --no-resolve-loader-roots-reset Negates resolve-loader-roots-reset - --no-resolve-loader-symlinks Negates resolve-loader-symlinks - --no-resolve-loader-unsafe-cache Negates resolve-loader-unsafe-cache - --no-resolve-loader-use-sync-file-system-calls Negates resolve-loader-use-sync-file- - system-calls - --no-stats-all Negates stats-all - --no-stats-assets Negates stats-assets - --no-stats-built-at Negates stats-built-at - --no-stats-cached Negates stats-cached - --no-stats-cached-assets Negates stats-cached-assets - --no-stats-children Negates stats-children - --no-stats-chunk-groups Negates stats-chunk-groups - --no-stats-chunk-modules Negates stats-chunk-modules - --no-stats-chunk-origins Negates stats-chunk-origins - --no-stats-chunk-relations Negates stats-chunk-relations - --no-stats-chunk-root-modules Negates stats-chunk-root-modules - --no-stats-chunks Negates stats-chunks - --no-stats-colors Negates stats-colors - --no-stats-depth Negates stats-depth - --no-stats-entrypoints Negates stats-entrypoints - --no-stats-env Negates stats-env - --no-stats-error-details Negates stats-error-details - --no-stats-error-stack Negates stats-error-stack - --no-stats-errors Negates stats-errors - --no-stats-exclude-assets-reset Negates stats-exclude-assets-reset - --no-stats-exclude-modules-reset Negates stats-exclude-modules-reset - --no-stats-hash Negates stats-hash - --no-stats-ids Negates stats-ids - --no-stats-logging-debug-reset Negates stats-logging-debug-reset - --no-stats-logging-trace Negates stats-logging-trace - --no-stats-module-assets Negates stats-module-assets - --no-stats-module-trace Negates stats-module-trace - --no-stats-modules Negates stats-modules - --no-stats-nested-modules Negates stats-nested-modules - --no-stats-optimization-bailout Negates stats-optimization-bailout - --no-stats-orphan-modules Negates stats-orphan-modules - --no-stats-output-path Negates stats-output-path - --no-stats-performance Negates stats-performance - --no-stats-provided-exports Negates stats-provided-exports - --no-stats-public-path Negates stats-public-path - --no-stats-reasons Negates stats-reasons - --no-stats-runtime Negates stats-runtime - --no-stats-source Negates stats-source - --no-stats-timings Negates stats-timings - --no-stats-used-exports Negates stats-used-exports - --no-stats-version Negates stats-version - --no-stats-warnings Negates stats-warnings - --no-stats-warnings-filter-reset Negates stats-warnings-filter-reset - --no-watch-options-ignored-reset Negates watch-options-ignored-reset - --no-watch-options-stdin Negates watch-options-stdin +``` + --amd You can pass `false` to disable AMD support. + --bail Report the first error as a hard error instead of tolerating it. + --cache Enable in memory caching. Disable caching. + --cache-immutable-paths string[] A path to a immutable directory (usually a package manager cache directory). + --cache-immutable-paths-reset Clear all items provided in configuration. List of paths that are managed by + a package manager and contain a version or hash in its path so all files are + immutable. + --cache-managed-paths string[] A path to a managed directory (usually a node_modules directory). + --cache-managed-paths-reset Clear all items provided in configuration. List of paths that are managed by + a package manager and can be trusted to not be modified otherwise. + --cache-type string In memory caching. Filesystem caching. + --cache-cache-directory string Base directory for the cache (defaults to node_modules/.cache/webpack). + --cache-cache-location string Locations for the cache (defaults to cacheDirectory / name). + --cache-hash-algorithm string Algorithm used for generation the hash (see node.js crypto package). + --cache-idle-timeout number Time in ms after which idle period the cache storing should happen (only for + store: 'pack' or 'idle'). + --cache-idle-timeout-for-initial-store number Time in ms after which idle period the initial cache storing should happen + (only for store: 'pack' or 'idle'). + --cache-name string Name for the cache. Different names will lead to different coexisting caches. + --cache-store string When to store data to the filesystem. (pack: Store data when compiler is idle + in a single file). + --cache-version string Version of the cache data. Different versions won't allow to reuse the cache + and override existing content. Update the version when config changed in a + way which doesn't allow to reuse cache. This will invalidate the cache. + --context string The base directory (absolute path!) for resolving the `entry` option. If + `output.pathinfo` is set, the included pathinfo is shortened to this + directory. + --dependencies string[] References to another configuration to depend on. + --dependencies-reset Clear all items provided in configuration. References to other configurations + to depend on. + --devtool string A developer tool to enhance debugging (false | eval | + [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map). + --entry-reset Clear all items provided in configuration. All modules are loaded upon + startup. The last one is exported. + --experiments-asset Allow module type 'asset' to generate assets. + --experiments-async-web-assembly Support WebAssembly as asynchronous EcmaScript Module. + --experiments-import-async Allow 'import/export' syntax to import async modules. + --experiments-import-await Allow 'import/export await' syntax to import async modules. + --experiments-mjs Support .mjs files as way to define strict ESM file (node.js). + --experiments-output-module Allow output javascript files as module source type. + --experiments-sync-web-assembly Support WebAssembly as synchronous EcmaScript Module (outdated). + --experiments-top-level-await Allow using top-level-await in EcmaScript Modules. + --externals string[] Every matched dependency becomes external. An exact matched dependency + becomes external. The same string is used as external dependency. + --externals-reset Clear all items provided in configuration. Specify dependencies that + shouldn't be resolved by webpack, but should become dependencies of the + resulting bundle. The kind of the dependency depends on + `output.libraryTarget`. + --externals-type string Specifies the default type of externals ('amd*', 'umd*', 'system' and 'jsonp' + depend on output.libraryTarget set to the same value). + --infrastructure-logging-debug string[] Enable/Disable debug logging for all loggers. Enable debug logging for + specific loggers. + --infrastructure-logging-debug-reset Clear all items provided in configuration. Enable debug logging for specific + loggers. + --infrastructure-logging-level string Log level. + --module-expr-context-critical Enable warnings for full dynamic dependencies. + --module-expr-context-recursive Enable recursive directory lookup for full dynamic dependencies. + --module-expr-context-reg-exp string Sets the default regular expression for full dynamic dependencies. + --module-expr-context-request string Set the default request for full dynamic dependencies. + --module-no-parse string[] A regular expression, when matched the module is not parsed. An absolute + path, when the module starts with this path it is not parsed. + --module-no-parse-reset Clear all items provided in configuration. Don't parse files matching. It's + matched against the full resolved request. + --module-rules-compiler string[] Match the child compiler name. + --module-rules-enforce string[] Enforce this rule as pre or post step. + --module-rules-exclude string[] Shortcut for resource.exclude. + --module-rules-include string[] Shortcut for resource.include. + --module-rules-issuer string[] Match the issuer of the module (The module pointing to this module). + --module-rules-loader string[] A loader request. + --module-rules-mimetype string[] Match module mimetype when load from Data URI. + --module-rules-options string[] Options passed to a loader. + --module-rules-real-resource string[] Match the real resource path of the module. + --module-rules-resource string[] Match the resource path of the module. + --module-rules-resource-fragment string[] Match the resource fragment of the module. + --module-rules-resource-query string[] Match the resource query of the module. + --module-rules-side-effects Flags a module as with or without side effects. + --module-rules-test string[] Shortcut for resource.test. + --module-rules-type string[] Module type to use for the module. + --module-rules-use-ident string[] Unique loader options identifier. + --module-rules-use-loader string[] A loader request. + --module-rules-use-options string[] Options passed to a loader. + --module-rules-use string[] A loader request. + --module-rules-reset Clear all items provided in configuration. A list of rules. + --module-strict-export-presence Emit errors instead of warnings when imported names don't exist in imported + module. + --module-strict-this-context-on-imports Handle the this context correctly according to the spec for namespace + objects. + --module-unknown-context-critical Enable warnings when using the require function in a not statically analyse- + able way. + --module-unknown-context-recursive Enable recursive directory lookup when using the require function in a not + statically analyse-able way. + --module-unknown-context-reg-exp string Sets the regular expression when using the require function in a not + statically analyse-able way. + --module-unknown-context-request string Sets the request when using the require function in a not statically analyse- + able way. + --module-unsafe-cache Cache the resolving of module requests. + --module-wrapped-context-critical Enable warnings for partial dynamic dependencies. + --module-wrapped-context-recursive Enable recursive directory lookup for partial dynamic dependencies. + --module-wrapped-context-reg-exp string Set the inner regular expression for partial dynamic dependencies. + --name string Name of the configuration. Used when loading multiple configurations. + --node Include polyfills or mocks for various node stuff. + --node-dirname string Include a polyfill for the '__dirname' variable. + --node-filename string Include a polyfill for the '__filename' variable. + --node-global Include a polyfill for the 'global' variable. + --optimization-check-wasm-types Check for incompatible wasm types when importing/exporting from/to ESM. + --optimization-chunk-ids string Define the algorithm to choose chunk ids (named: readable ids for better + debugging, deterministic: numeric hash ids for better long term caching, + size: numeric ids focused on minimal initial download size, total-size: + numeric ids focused on minimal total download size, false: no algorithm used, + as custom one can be provided via plugin). + --optimization-concatenate-modules Concatenate modules when possible to generate less modules, more efficient + code and enable more optimizations by the minimizer. + --optimization-emit-on-errors Emit assets even when errors occur. Critical errors are emitted into the + generated code and will case errors at runtime. + --optimization-flag-included-chunks Also flag chunks as loaded which contain a subset of the modules. + --optimization-inner-graph Creates a module-internal dependency graph for top level symbols, exports and + imports, to improve unused exports detection. + --optimization-mangle-exports Rename exports when possible to generate shorter code (depends on + optimization.usedExports and optimization.providedExports). + --optimization-mangle-wasm-imports Reduce size of WASM by changing imports to shorter strings. + --optimization-merge-duplicate-chunks Merge chunks which contain the same modules. + --optimization-minimize Enable minimizing the output. Uses optimization.minimizer. + --optimization-module-ids string Define the algorithm to choose module ids (natural: numeric ids in order of + usage, named: readable ids for better debugging, hashed: (deprecated) short + hashes as ids for better long term caching, deterministic: numeric hash ids + for better long term caching, size: numeric ids focused on minimal initial + download size, false: no algorithm used, as custom one can be provided via + plugin). + --optimization-node-env string Set process.env.NODE_ENV to a specific value. + --optimization-portable-records Generate records with relative paths to be able to move the context folder. + --optimization-provided-exports Figure out which exports are provided by modules to generate more efficient + code. + --optimization-remove-available-modules Removes modules from chunks when these modules are already included in all + parents. + --optimization-remove-empty-chunks Remove chunks which are empty. + --optimization-runtime-chunk string Create an additional chunk which contains only the webpack runtime and chunk + hash maps. + --optimization-runtime-chunk-name string The name or name factory for the runtime chunks. + --optimization-side-effects Skip over modules which are flagged to contain no side effects when exports + are not used. + --optimization-split-chunks Optimize duplication and caching by splitting chunks by shared modules and + cache group. + --optimization-split-chunks-chunks string Select chunks for determining shared modules (defaults to "async", "initial" + and "all" requires adding these chunks to the HTML). + --optimization-split-chunks-filename string Sets the template for the filename for created chunks. + --optimization-split-chunks-hide-path-info Prevents exposing path info when creating names for parts splitted by + maxSize. + --optimization-split-chunks-max-async-requests number Maximum number of requests which are accepted for on-demand loading. + --optimization-split-chunks-max-async-size number Size of the javascript part of the chunk. + --optimization-split-chunks-max-initial-requests number Maximum number of initial chunks which are accepted for an entry point. + --optimization-split-chunks-max-initial-size number Size of the javascript part of the chunk. + --optimization-split-chunks-max-size number Size of the javascript part of the chunk. + --optimization-split-chunks-min-chunks number Minimum number of times a module has to be duplicated until it's considered + for splitting. + --optimization-split-chunks-min-remaining-size number Size of the javascript part of the chunk. + --optimization-split-chunks-min-size number Size of the javascript part of the chunk. + --optimization-split-chunks-name string Give chunks created a name (chunks with equal name are merged). + --optimization-used-exports Figure out which exports are used by modules to mangle export names, omit + unused exports and generate more efficient code. + --output-asset-module-filename string The filename of asset modules as relative path inside the `output.path` + directory. + --output-chunk-callback-name string The callback function name used by webpack for loading of chunks in + WebWorkers. + --output-chunk-filename string The filename of non-entry chunks as relative path inside the `output.path` + directory. + --output-chunk-load-timeout number Number of milliseconds before chunk request expires. + --output-compare-before-emit Check if to be emitted file already exists and have the same content before + writing to output filesystem. + --output-cross-origin-loading string This option enables cross-origin loading of chunks. + --output-devtool-fallback-module-filename-template string Similar to `output.devtoolModuleFilenameTemplate`, but used in the case of + duplicate module identifiers. + --output-devtool-module-filename-template string Filename template string of function for the sources array in a generated + SourceMap. + --output-devtool-namespace string Module namespace to use when interpolating filename template string for the + sources array in a generated SourceMap. Defaults to `output.library` if not + set. It's useful for avoiding runtime collisions in sourcemaps from multiple + webpack projects built as libraries. + --output-ecma-version number The maximum EcmaScript version of the webpack generated code (doesn't include + input source code from modules). + --output-enabled-library-types string[] Type of library. + --output-enabled-library-types-reset Clear all items provided in configuration. List of library types enabled for + use by entry points. + --output-filename string Specifies the name of each output file on disk. You must **not** specify an + absolute path here! The `output.path` option determines the location on disk + the files are written to, filename is used solely for naming the individual + files. + --output-global-object string An expression which is used to address the global object/scope in runtime + code. + --output-hash-digest string Digest type used for the hash. + --output-hash-digest-length number Number of chars which are used for the hash. + --output-hash-function string Algorithm used for generation the hash (see node.js crypto package). + --output-hash-salt string Any string which is added to the hash to salt it. + --output-hot-update-chunk-filename string The filename of the Hot Update Chunks. They are inside the output.path + directory. + --output-hot-update-function string The JSONP function used by webpack for async loading of hot update chunks. + --output-hot-update-main-filename string The filename of the Hot Update Main File. It is inside the `output.path` + directory. + --output-iife Wrap javascript code into IIFE's to avoid leaking into global scope. + --output-import-function-name string The name of the native import() function (can be exchanged for a polyfill). + --output-jsonp-function string The JSONP function used by webpack for async loading of chunks. + --output-library string[] A part of the library name. + --output-library-reset Clear all items provided in configuration. The name of the library (some + types allow unnamed libraries too). + --output-library-amd string Name of the exposed AMD library in the UMD. + --output-library-commonjs string Name of the exposed commonjs export in the UMD. + --output-library-root string[] Part of the name of the property exposed globally by a UMD library. + --output-library-root-reset Clear all items provided in configuration. Name of the property exposed + globally by a UMD library. + --output-library-auxiliary-comment string Append the same comment above each import style. + --output-library-auxiliary-comment-amd string Set comment for `amd` section in UMD. + --output-library-auxiliary-comment-commonjs string Set comment for `commonjs` (exports) section in UMD. + --output-library-auxiliary-comment-commonjs2 string Set comment for `commonjs2` (module.exports) section in UMD. + --output-library-auxiliary-comment-root string Set comment for `root` (global variable) section in UMD. + --output-library-export string[] Part of the export that should be exposed as library. + --output-library-export-reset Clear all items provided in configuration. Specify which export should be + exposed as library. + --output-library-name string[] A part of the library name. + --output-library-name-reset Clear all items provided in configuration. The name of the library (some + types allow unnamed libraries too). + --output-library-name-amd string Name of the exposed AMD library in the UMD. + --output-library-name-commonjs string Name of the exposed commonjs export in the UMD. + --output-library-name-root string[] Part of the name of the property exposed globally by a UMD library. + --output-library-name-root-reset Clear all items provided in configuration. Name of the property exposed + globally by a UMD library. + --output-library-type string Type of library. + --output-library-umd-named-define If `output.libraryTarget` is set to umd and `output.library` is set, setting + this to true will name the AMD module. + --output-module Output javascript files as module source type. + --output-path string The output directory as **absolute path** (required). + --output-pathinfo Include comments with information about the modules. + --output-public-path string The `publicPath` specifies the public URL address of the output files when + referenced in a browser. + --output-script-type string This option enables loading async chunks via a custom script type, such as + script type="module". + --output-source-map-filename string The filename of the SourceMaps for the JavaScript files. They are inside the + `output.path` directory. + --output-source-prefix string Prefixes every line of the source in the bundle with this string. + --output-strict-module-exception-handling Handles exceptions in module loading correctly at a performance cost. + --output-unique-name string A unique name of the webpack build to avoid multiple webpack runtimes to + conflict when using globals. + --output-webassembly-module-filename string The filename of WebAssembly modules as relative path inside the `output.path` + directory. + --parallelism number The number of parallel processed modules in the compilation. + --performance Configuration for web performance recommendations. + --performance-hints string Sets the format of the hints: warnings, errors or nothing at all. + --performance-max-asset-size number File size limit (in bytes) when exceeded, that webpack will provide + performance hints. + --performance-max-entrypoint-size number Total size of an entry point (in bytes). + --profile Capture timing information for each module. + --records-input-path string Store compiler state to a json file. + --records-output-path string Load compiler state from a json file. + --records-path string Store/Load compiler state from/to a json file. This will result in persistent + ids of modules and chunks. An absolute path is expected. `recordsPath` is + used for `recordsInputPath` and `recordsOutputPath` if they left undefined. + --resolve-alias-alias string[] Ignore request (replace with empty module). New request. + --resolve-alias-name string[] Request to be redirected. + --resolve-alias-only-module Redirect only exact matching request. + --resolve-alias-reset Clear all items provided in configuration. Redirect module requests. + --resolve-alias-fields string[] Field in the description file (usually package.json) which are used to + redirect requests inside the module. + --resolve-alias-fields-reset Clear all items provided in configuration. Fields in the description file + (usually package.json) which are used to redirect requests inside the module. + --resolve-cache Enable caching of successfully resolved requests (cache entries are + revalidated). + --resolve-cache-with-context Include the context information in the cache identifier when caching. + --resolve-condition-names string[] Condition names for exports field entry point. + --resolve-condition-names-reset Clear all items provided in configuration. Condition names for exports field + entry point. + --resolve-description-files string[] Filename used to find a description file (like a package.json). + --resolve-description-files-reset Clear all items provided in configuration. Filenames used to find a + description file (like a package.json). + --resolve-enforce-extension Enforce the resolver to use one of the extensions from the extensions option + (User must specify requests without extension). + --resolve-exports-fields string[] Field name from the description file (usually package.json) which is used to + provide entry points of a package. + --resolve-exports-fields-reset Clear all items provided in configuration. Field names from the description + file (usually package.json) which are used to provide entry points of a + package. + --resolve-extensions string[] Extension added to the request when trying to find the file. + --resolve-extensions-reset Clear all items provided in configuration. Extensions added to the request + when trying to find the file. + --resolve-fully-specified Treats the request specified by the user as fully specified, meaning no + extensions are added and the mainFiles in directories are not resolved (This + doesn't affect requests from mainFields, aliasFields or aliases). + --resolve-main-fields string[] Field name from the description file (package.json) which are used to find + the default entry point. + --resolve-main-fields-reset Clear all items provided in configuration. Field names from the description + file (package.json) which are used to find the default entry point. + --resolve-main-files string[] Filename used to find the default entry point if there is no description file + or main field. + --resolve-main-files-reset Clear all items provided in configuration. Filenames used to find the default + entry point if there is no description file or main field. + --resolve-modules string[] Folder name or directory path where to find modules. + --resolve-modules-reset Clear all items provided in configuration. Folder names or directory paths + where to find modules. + --resolve-restrictions string[] Resolve restriction. Resolve result must fulfill this restriction. + --resolve-restrictions-reset Clear all items provided in configuration. A list of resolve restrictions. + Resolve results must fulfill all of these restrictions to resolve + successfully. Other resolve paths are taken when restrictions are not met. + --resolve-roots string[] Directory in which requests that are server-relative URLs (starting with '/') + are resolved. + --resolve-roots-reset Clear all items provided in configuration. A list of directories in which + requests that are server-relative URLs (starting with '/') are resolved. On + non-windows system these requests are tried to resolve as absolute path + first. + --resolve-symlinks Enable resolving symlinks to the original location. + --resolve-unsafe-cache Enable caching of successfully resolved requests (cache entries are not + revalidated). + --resolve-use-sync-file-system-calls Use synchronous filesystem calls for the resolver. + --resolve-loader-alias-alias string[] Ignore request (replace with empty module). New request. + --resolve-loader-alias-name string[] Request to be redirected. + --resolve-loader-alias-only-module Redirect only exact matching request. + --resolve-loader-alias-reset Clear all items provided in configuration. Redirect module requests. + --resolve-loader-alias-fields string[] Field in the description file (usually package.json) which are used to + redirect requests inside the module. + --resolve-loader-alias-fields-reset Clear all items provided in configuration. Fields in the description file + (usually package.json) which are used to redirect requests inside the module. + --resolve-loader-cache Enable caching of successfully resolved requests (cache entries are + revalidated). + --resolve-loader-cache-with-context Include the context information in the cache identifier when caching. + --resolve-loader-condition-names string[] Condition names for exports field entry point. + --resolve-loader-condition-names-reset Clear all items provided in configuration. Condition names for exports field + entry point. + --resolve-loader-description-files string[] Filename used to find a description file (like a package.json). + --resolve-loader-description-files-reset Clear all items provided in configuration. Filenames used to find a + description file (like a package.json). + --resolve-loader-enforce-extension Enforce the resolver to use one of the extensions from the extensions option + (User must specify requests without extension). + --resolve-loader-exports-fields string[] Field name from the description file (usually package.json) which is used to + provide entry points of a package. + --resolve-loader-exports-fields-reset Clear all items provided in configuration. Field names from the description + file (usually package.json) which are used to provide entry points of a + package. + --resolve-loader-extensions string[] Extension added to the request when trying to find the file. + --resolve-loader-extensions-reset Clear all items provided in configuration. Extensions added to the request + when trying to find the file. + --resolve-loader-fully-specified Treats the request specified by the user as fully specified, meaning no + extensions are added and the mainFiles in directories are not resolved (This + doesn't affect requests from mainFields, aliasFields or aliases). + --resolve-loader-main-fields string[] Field name from the description file (package.json) which are used to find + the default entry point. + --resolve-loader-main-fields-reset Clear all items provided in configuration. Field names from the description + file (package.json) which are used to find the default entry point. + --resolve-loader-main-files string[] Filename used to find the default entry point if there is no description file + or main field. + --resolve-loader-main-files-reset Clear all items provided in configuration. Filenames used to find the default + entry point if there is no description file or main field. + --resolve-loader-modules string[] Folder name or directory path where to find modules. + --resolve-loader-modules-reset Clear all items provided in configuration. Folder names or directory paths + where to find modules. + --resolve-loader-restrictions string[] Resolve restriction. Resolve result must fulfill this restriction. + --resolve-loader-restrictions-reset Clear all items provided in configuration. A list of resolve restrictions. + Resolve results must fulfill all of these restrictions to resolve + successfully. Other resolve paths are taken when restrictions are not met. + --resolve-loader-roots string[] Directory in which requests that are server-relative URLs (starting with '/') + are resolved. + --resolve-loader-roots-reset Clear all items provided in configuration. A list of directories in which + requests that are server-relative URLs (starting with '/') are resolved. On + non-windows system these requests are tried to resolve as absolute path + first. + --resolve-loader-symlinks Enable resolving symlinks to the original location. + --resolve-loader-unsafe-cache Enable caching of successfully resolved requests (cache entries are not + revalidated). + --resolve-loader-use-sync-file-system-calls Use synchronous filesystem calls for the resolver. + --stats-all Fallback value for stats options when an option is not defined (has + precedence over local webpack defaults). + --stats-assets Add assets information. + --stats-assets-sort string Sort the assets by that field. + --stats-built-at Add built at time information. + --stats-cached Add information about cached (not built) modules. + --stats-cached-assets Show cached assets (setting this to `false` only shows emitted files). + --stats-children Add children information. + --stats-chunk-groups Display all chunk groups with the corresponding bundles. + --stats-chunk-modules Add built modules information to chunk information. + --stats-chunk-origins Add the origins of chunks and chunk merging info. + --stats-chunk-relations Add information about parent, children and sibling chunks to chunk + information. + --stats-chunk-root-modules Add root modules information to chunk information. + --stats-chunks Add chunk information. + --stats-chunks-sort string Sort the chunks by that field. + --stats-colors Enables/Disables colorful output. + --stats-colors-bold string Custom color for bold text. + --stats-colors-cyan string Custom color for cyan text. + --stats-colors-green string Custom color for green text. + --stats-colors-magenta string Custom color for magenta text. + --stats-colors-red string Custom color for red text. + --stats-colors-yellow string Custom color for yellow text. + --stats-context string Context directory for request shortening. + --stats-depth Add module depth in module graph. + --stats-entrypoints Display the entry points with the corresponding bundles. + --stats-env Add --env information. + --stats-error-details Add details to errors (like resolving log). + --stats-error-stack Add internal stack trace to errors. + --stats-errors Add errors. + --stats-exclude-assets string[] Suppress assets that match the specified filters. Filters can be Strings, + RegExps or Functions. + --stats-exclude-assets-reset Clear all items provided in configuration. Suppress assets that match the + specified filters. Filters can be Strings, RegExps or Functions. + --stats-exclude-modules string[] Suppress modules that match the specified filters. Filters can be Strings, + RegExps, Booleans or Functions. + --stats-exclude-modules-reset Clear all items provided in configuration. Suppress modules that match the + specified filters. Filters can be Strings, RegExps, Booleans or Functions. + --stats-hash Add the hash of the compilation. + --stats-ids Add ids. + --stats-logging string Specify log level of logging output. Enable/disable logging output (`true`: + shows normal logging output, loglevel: log). + --stats-logging-debug string[] Enable/Disable debug logging for all loggers. Include debug logging of + specified loggers (i. e. for plugins or loaders). Filters can be Strings, + RegExps or Functions. + --stats-logging-debug-reset Clear all items provided in configuration. Include debug logging of specified + loggers (i. e. for plugins or loaders). Filters can be Strings, RegExps or + Functions. + --stats-logging-trace Add stack traces to logging output. + --stats-max-modules number Set the maximum number of modules to be shown. + --stats-module-assets Add information about assets inside modules. + --stats-module-trace Add dependencies and origin of warnings/errors. + --stats-modules Add built modules information. + --stats-modules-sort string Sort the modules by that field. + --stats-nested-modules Add information about modules nested in other modules (like with module + concatenation). + --stats-optimization-bailout Show reasons why optimization bailed out for modules. + --stats-orphan-modules Add information about orphan modules. + --stats-output-path Add output path information. + --stats-performance Add performance hint flags. + --stats-preset string Preset for the default values. + --stats-provided-exports Show exports provided by modules. + --stats-public-path Add public path information. + --stats-reasons Add information about the reasons why modules are included. + --stats-runtime Add information about runtime modules. + --stats-source Add the source code of modules. + --stats-timings Add timing information. + --stats-used-exports Show exports used by modules. + --stats-version Add webpack version information. + --stats-warnings Add warnings. + --stats-warnings-filter string[] Suppress warnings that match the specified filters. Filters can be Strings, + RegExps or Functions. + --stats-warnings-filter-reset Clear all items provided in configuration. Suppress warnings that match the + specified filters. Filters can be Strings, RegExps or Functions. + --watch-options-aggregate-timeout number Delay the rebuilt after the first change. Value is a time in ms. + --watch-options-ignored string[] A glob pattern for files that should be ignored from watching. + --watch-options-ignored-reset Clear all items provided in configuration. Ignore some files from watching + (glob pattern). + --watch-options-poll string `number`: use polling with specified interval. `true`: use polling. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-hot Negates hot + --no-stats Negates stats + --no-amd Negates amd + --no-bail Negates bail + --no-cache Negates cache + --no-cache-immutable-paths-reset Negates cache-immutable-paths-reset + --no-cache-managed-paths-reset Negates cache-managed-paths-reset + --no-dependencies-reset Negates dependencies-reset + --no-entry-reset Negates entry-reset + --no-experiments-asset Negates experiments-asset + --no-experiments-async-web-assembly Negates experiments-async-web-assembly + --no-experiments-import-async Negates experiments-import-async + --no-experiments-import-await Negates experiments-import-await + --no-experiments-mjs Negates experiments-mjs + --no-experiments-output-module Negates experiments-output-module + --no-experiments-sync-web-assembly Negates experiments-sync-web-assembly + --no-experiments-top-level-await Negates experiments-top-level-await + --no-externals-reset Negates externals-reset + --no-infrastructure-logging-debug-reset Negates infrastructure-logging-debug-reset + --no-module-expr-context-critical Negates module-expr-context-critical + --no-module-expr-context-recursive Negates module-expr-context-recursive + --no-module-no-parse-reset Negates module-no-parse-reset + --no-module-rules-side-effects Negates module-rules-side-effects + --no-module-rules-reset Negates module-rules-reset + --no-module-strict-export-presence Negates module-strict-export-presence + --no-module-strict-this-context-on-imports Negates module-strict-this-context-on-imports + --no-module-unknown-context-critical Negates module-unknown-context-critical + --no-module-unknown-context-recursive Negates module-unknown-context-recursive + --no-module-unsafe-cache Negates module-unsafe-cache + --no-module-wrapped-context-critical Negates module-wrapped-context-critical + --no-module-wrapped-context-recursive Negates module-wrapped-context-recursive + --no-node Negates node + --no-node-global Negates node-global + --no-optimization-check-wasm-types Negates optimization-check-wasm-types + --no-optimization-concatenate-modules Negates optimization-concatenate-modules + --no-optimization-emit-on-errors Negates optimization-emit-on-errors + --no-optimization-flag-included-chunks Negates optimization-flag-included-chunks + --no-optimization-inner-graph Negates optimization-inner-graph + --no-optimization-mangle-exports Negates optimization-mangle-exports + --no-optimization-mangle-wasm-imports Negates optimization-mangle-wasm-imports + --no-optimization-merge-duplicate-chunks Negates optimization-merge-duplicate-chunks + --no-optimization-minimize Negates optimization-minimize + --no-optimization-portable-records Negates optimization-portable-records + --no-optimization-provided-exports Negates optimization-provided-exports + --no-optimization-remove-available-modules Negates optimization-remove-available-modules + --no-optimization-remove-empty-chunks Negates optimization-remove-empty-chunks + --no-optimization-side-effects Negates optimization-side-effects + --no-optimization-split-chunks Negates optimization-split-chunks + --no-optimization-split-chunks-hide-path-info Negates optimization-split-chunks-hide-path-info + --no-optimization-used-exports Negates optimization-used-exports + --no-output-compare-before-emit Negates output-compare-before-emit + --no-output-enabled-library-types-reset Negates output-enabled-library-types-reset + --no-output-iife Negates output-iife + --no-output-library-reset Negates output-library-reset + --no-output-library-root-reset Negates output-library-root-reset + --no-output-library-export-reset Negates output-library-export-reset + --no-output-library-name-reset Negates output-library-name-reset + --no-output-library-name-root-reset Negates output-library-name-root-reset + --no-output-library-umd-named-define Negates output-library-umd-named-define + --no-output-module Negates output-module + --no-output-pathinfo Negates output-pathinfo + --no-output-strict-module-exception-handling Negates output-strict-module-exception-handling + --no-performance Negates performance + --no-profile Negates profile + --no-resolve-alias-only-module Negates resolve-alias-only-module + --no-resolve-alias-reset Negates resolve-alias-reset + --no-resolve-alias-fields-reset Negates resolve-alias-fields-reset + --no-resolve-cache Negates resolve-cache + --no-resolve-cache-with-context Negates resolve-cache-with-context + --no-resolve-condition-names-reset Negates resolve-condition-names-reset + --no-resolve-description-files-reset Negates resolve-description-files-reset + --no-resolve-enforce-extension Negates resolve-enforce-extension + --no-resolve-exports-fields-reset Negates resolve-exports-fields-reset + --no-resolve-extensions-reset Negates resolve-extensions-reset + --no-resolve-fully-specified Negates resolve-fully-specified + --no-resolve-main-fields-reset Negates resolve-main-fields-reset + --no-resolve-main-files-reset Negates resolve-main-files-reset + --no-resolve-modules-reset Negates resolve-modules-reset + --no-resolve-restrictions-reset Negates resolve-restrictions-reset + --no-resolve-roots-reset Negates resolve-roots-reset + --no-resolve-symlinks Negates resolve-symlinks + --no-resolve-unsafe-cache Negates resolve-unsafe-cache + --no-resolve-use-sync-file-system-calls Negates resolve-use-sync-file-system-calls + --no-resolve-loader-alias-only-module Negates resolve-loader-alias-only-module + --no-resolve-loader-alias-reset Negates resolve-loader-alias-reset + --no-resolve-loader-alias-fields-reset Negates resolve-loader-alias-fields-reset + --no-resolve-loader-cache Negates resolve-loader-cache + --no-resolve-loader-cache-with-context Negates resolve-loader-cache-with-context + --no-resolve-loader-condition-names-reset Negates resolve-loader-condition-names-reset + --no-resolve-loader-description-files-reset Negates resolve-loader-description-files-reset + --no-resolve-loader-enforce-extension Negates resolve-loader-enforce-extension + --no-resolve-loader-exports-fields-reset Negates resolve-loader-exports-fields-reset + --no-resolve-loader-extensions-reset Negates resolve-loader-extensions-reset + --no-resolve-loader-fully-specified Negates resolve-loader-fully-specified + --no-resolve-loader-main-fields-reset Negates resolve-loader-main-fields-reset + --no-resolve-loader-main-files-reset Negates resolve-loader-main-files-reset + --no-resolve-loader-modules-reset Negates resolve-loader-modules-reset + --no-resolve-loader-restrictions-reset Negates resolve-loader-restrictions-reset + --no-resolve-loader-roots-reset Negates resolve-loader-roots-reset + --no-resolve-loader-symlinks Negates resolve-loader-symlinks + --no-resolve-loader-unsafe-cache Negates resolve-loader-unsafe-cache + --no-resolve-loader-use-sync-file-system-calls Negates resolve-loader-use-sync-file-system-calls + --no-stats-all Negates stats-all + --no-stats-assets Negates stats-assets + --no-stats-built-at Negates stats-built-at + --no-stats-cached Negates stats-cached + --no-stats-cached-assets Negates stats-cached-assets + --no-stats-children Negates stats-children + --no-stats-chunk-groups Negates stats-chunk-groups + --no-stats-chunk-modules Negates stats-chunk-modules + --no-stats-chunk-origins Negates stats-chunk-origins + --no-stats-chunk-relations Negates stats-chunk-relations + --no-stats-chunk-root-modules Negates stats-chunk-root-modules + --no-stats-chunks Negates stats-chunks + --no-stats-colors Negates stats-colors + --no-stats-depth Negates stats-depth + --no-stats-entrypoints Negates stats-entrypoints + --no-stats-env Negates stats-env + --no-stats-error-details Negates stats-error-details + --no-stats-error-stack Negates stats-error-stack + --no-stats-errors Negates stats-errors + --no-stats-exclude-assets-reset Negates stats-exclude-assets-reset + --no-stats-exclude-modules-reset Negates stats-exclude-modules-reset + --no-stats-hash Negates stats-hash + --no-stats-ids Negates stats-ids + --no-stats-logging-debug-reset Negates stats-logging-debug-reset + --no-stats-logging-trace Negates stats-logging-trace + --no-stats-module-assets Negates stats-module-assets + --no-stats-module-trace Negates stats-module-trace + --no-stats-modules Negates stats-modules + --no-stats-nested-modules Negates stats-nested-modules + --no-stats-optimization-bailout Negates stats-optimization-bailout + --no-stats-orphan-modules Negates stats-orphan-modules + --no-stats-output-path Negates stats-output-path + --no-stats-performance Negates stats-performance + --no-stats-provided-exports Negates stats-provided-exports + --no-stats-public-path Negates stats-public-path + --no-stats-reasons Negates stats-reasons + --no-stats-runtime Negates stats-runtime + --no-stats-source Negates stats-source + --no-stats-timings Negates stats-timings + --no-stats-used-exports Negates stats-used-exports + --no-stats-version Negates stats-version + --no-stats-warnings Negates stats-warnings + --no-stats-warnings-filter-reset Negates stats-warnings-filter-reset + --no-watch-options-ignored-reset Negates watch-options-ignored-reset + --no-watch-options-stdin Negates watch-options-stdin ``` ## Defaults From 6287f0b83b3537c5ec5b0ab0d36183b3c823928c Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Mon, 27 Jul 2020 14:35:46 +0530 Subject: [PATCH 14/21] docs: reduce spaces --- packages/webpack-cli/README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/webpack-cli/README.md b/packages/webpack-cli/README.md index a2d080cdbf0..5338a7739cf 100644 --- a/packages/webpack-cli/README.md +++ b/packages/webpack-cli/README.md @@ -205,6 +205,15 @@ yarn add webpack-cli --dev cache group. --optimization-split-chunks-chunks string Select chunks for determining shared modules (defaults to "async", "initial" and "all" requires adding these chunks to the HTML). + + --optimization-split-chunks-enforce-size-threshold string Size of the javascript part of the chunk. + --optimization-split-chunks-fallback-cache-group-automatic-name-delimiter string Sets the name delimiter for created chunks + --optimization-split-chunks-fallback-cache-group-max-async-size number Size of the javascript part of the chunk + --optimization-split-chunks-fallback-cache-group-max-initial-size number Size of the javascript part of the chunk. + --optimization-split-chunks-fallback-cache-group-max-size number Size of the javascript part of the chunk. + --optimization-split-chunks-fallback-cache-group-min-size number Size of the javascript part of the chunk. + + --optimization-split-chunks-automatic-name-delimiter string Sets the name delimiter for created chunks --optimization-split-chunks-filename string Sets the template for the filename for created chunks. --optimization-split-chunks-hide-path-info Prevents exposing path info when creating names for parts splitted by maxSize. From c02c26e969d14753f76a9084c81b559fef595b53 Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Mon, 27 Jul 2020 14:54:36 +0530 Subject: [PATCH 15/21] tests: wip --- test/core-flags/module-flags.test.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/core-flags/module-flags.test.js b/test/core-flags/module-flags.test.js index be8ad635b28..2c2aecce268 100644 --- a/test/core-flags/module-flags.test.js +++ b/test/core-flags/module-flags.test.js @@ -63,6 +63,16 @@ describe('module config related flag', () => { } else if (propName === 'enforce') { stdout = run(__dirname, [`--${flag.name}`, 'pre', '--module-rules-use-loader', 'myLoader']).stdout; expect(stdout).toContain(`${propName}: 'pre'`); + } else if (flag.name === 'module-rules-options') { + stdout = run(__dirname, [ + `--module-rules-test`, + '/.js$/', + '--module-rules-loader', + 'myLoader', + '--module-rules-options', + 'presets', + ]).stdout; + expect(stdout).toContain('presets'); } else { stdout = run(__dirname, [`--${flag.name}`, '/rules-value']).stdout; expect(stdout).toContain('rules-value'); From e539f022f8585e92dc0951c5973ca4eea3de6126 Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Mon, 27 Jul 2020 15:49:46 +0530 Subject: [PATCH 16/21] tests: resolve-alias-* --- test/core-flags/module-flags.test.js | 2 -- test/core-flags/resolve-flags.test.js | 44 ++++++++++++++++++++++++++- test/core-flags/webpack.config.js | 2 +- 3 files changed, 44 insertions(+), 4 deletions(-) diff --git a/test/core-flags/module-flags.test.js b/test/core-flags/module-flags.test.js index 2c2aecce268..16a30915555 100644 --- a/test/core-flags/module-flags.test.js +++ b/test/core-flags/module-flags.test.js @@ -14,8 +14,6 @@ describe('module config related flag', () => { } const propName = hyphenToUpperCase(property); - //TODO: improve webpackCLITestPlugin for testing of nested options - // i.e, module-rules-* flags, right now it logs rules: [Object] only. if (flag.type === Boolean && !flag.name.includes('module-no-parse')) { it(`should config --${flag.name} correctly`, () => { const { stderr, stdout } = run(__dirname, [`--${flag.name}`]); diff --git a/test/core-flags/resolve-flags.test.js b/test/core-flags/resolve-flags.test.js index dad72dac514..e71d8cc7eef 100644 --- a/test/core-flags/resolve-flags.test.js +++ b/test/core-flags/resolve-flags.test.js @@ -32,8 +32,50 @@ describe('resolve config related flags', () => { it(`should config --${flag.name} correctly`, () => { const { stderr, stdout } = run(__dirname, [`--${flag.name}`, 'browser']); expect(stderr).toBeFalsy(); - expect(stdout).toContain(`${propName}: [ 'browser' ]`); + if (propName === 'restrictions') { + expect(stdout).toContain('browser'); + } else { + expect(stdout).toContain(`${propName}: [ 'browser' ]`); + } + }); + } + + if (flag.name.includes('alias-')) { + it(`should config --${flag.name} correctly`, () => { + const { stderr, stdout } = run(__dirname, [ + `--resolve-alias-alias`, + 'alias', + '--resolve-alias-name', + 'name', + '--resolve-alias-fields', + 'aliasField', + '--resolve-loader-alias-alias', + 'loaderAlias', + '--resolve-loader-alias-name', + 'loaderName', + '--resolve-loader-alias-fields', + 'loader-field', + ]); + expect(stderr).toBeFalsy(); + expect(stdout).toContain(`alias: [ { alias: 'alias', name: 'name' } ]`); + expect(stdout).toContain(`aliasFields: [ 'aliasField' ]`); + expect(stdout).toContain(`alias: [ { alias: 'loaderAlias', name: 'loaderName' } ]`); + expect(stdout).toContain(`aliasFields: [ 'loader-field' ]`); }); + + if (flag.name.includes('reset')) { + it(`should config --${flag.name} alias-reset flags correctly`, () => { + const { stderr, stdout } = run(__dirname, [ + `--resolve-alias-reset`, + '--resolve-alias-fields-reset', + '--resolve-loader-alias-reset', + '--resolve-loader-alias-fields-reset', + ]); + expect(stderr).toBeFalsy(); + expect(stdout).toContain(`alias: []`); + expect(stdout).toContain(`aliasFields: []`); + }); + } } }); }); diff --git a/test/core-flags/webpack.config.js b/test/core-flags/webpack.config.js index f753d90b255..47630dfc2e8 100644 --- a/test/core-flags/webpack.config.js +++ b/test/core-flags/webpack.config.js @@ -4,5 +4,5 @@ module.exports = { entry: './main.js', mode: 'development', name: 'compiler', - plugins: [new WebpackCLITestPlugin(['module'])], + plugins: [new WebpackCLITestPlugin(['module', 'resolve', 'resolveLoader'])], }; From 03e4b3d6bf6b5a2b1095ee39dd437cbc0a859f0b Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Mon, 27 Jul 2020 18:43:44 +0530 Subject: [PATCH 17/21] tests: updates --- test/core-flags/cache-flags.test.js | 24 +++--------------------- test/core-flags/context-flag.test.js | 9 +-------- test/core-flags/module-flags.test.js | 14 ++------------ 3 files changed, 6 insertions(+), 41 deletions(-) diff --git a/test/core-flags/cache-flags.test.js b/test/core-flags/cache-flags.test.js index 21c56d531ec..2b827c6f120 100644 --- a/test/core-flags/cache-flags.test.js +++ b/test/core-flags/cache-flags.test.js @@ -1,7 +1,6 @@ 'use strict'; const { run } = require('../utils/test-utils'); -const { resolve } = require('path'); describe('cahche related flags from core', () => { it('should be successful with --cache ', () => { @@ -27,28 +26,16 @@ describe('cahche related flags from core', () => { it('should set cache.cacheDirectory with --cache-cache-directory', () => { const { stderr, stdout } = run(__dirname, ['--cache-type', 'filesystem', '--cache-cache-directory', '/test-cache-path']); - const path = resolve('/test-cache-path'); expect(stderr).toBeFalsy(); - if (process.platform === 'win32') { - // for windows - expect(stdout).toContain('test-cache-path'); - } else { - expect(stdout).toContain(`cacheDirectory: '${path}'`); - } + expect(stdout).toContain('test-cache-path'); }); it('should set cache.cacheLocation with --cache-cache-locations', () => { const { stderr, stdout } = run(__dirname, ['--cache-type', 'filesystem', '--cache-cache-location', '/test-locate-cache']); - const path = resolve('/test-locate-cache'); expect(stderr).toBeFalsy(); - if (process.platform === 'win32') { - // for windows - expect(stdout).toContain('test-locate-cache'); - } else { - expect(stdout).toContain(`cacheLocation: '${path}'`); - } + expect(stdout).toContain('test-locate-cache'); }); it('should set cache.hashAlgorithm with --cache-hash-algorithm', () => { @@ -62,12 +49,7 @@ describe('cahche related flags from core', () => { const { stderr, stdout } = run(__dirname, ['--cache-type', 'memory', '--cache-managed-paths', '/test-manage-path']); expect(stderr).toBeFalsy(); - if (process.platform === 'win32') { - // for windows - expect(stdout).toContain('test-manage-path'); - } else { - expect(stdout).toContain(`managedPaths: [ '/test-manage-path' ]`); - } + expect(stdout).toContain('test-manage-path'); }); it('should reset cache.managedPaths with --cache-managed-paths-reset', () => { diff --git a/test/core-flags/context-flag.test.js b/test/core-flags/context-flag.test.js index c26d5b07d39..98f13ea2c24 100644 --- a/test/core-flags/context-flag.test.js +++ b/test/core-flags/context-flag.test.js @@ -1,19 +1,12 @@ 'use strict'; const { run } = require('../utils/test-utils'); -const { resolve } = require('path'); describe('--context flag', () => { it('should allow to set context', () => { const { stderr, stdout } = run(__dirname, ['--context', '/test-context-path']); - const path = resolve('/test-context-path'); expect(stderr).toBeFalsy(); - if (process.platform === 'win32') { - // for windows - expect(stdout).toContain('test-context-path'); - } else { - expect(stdout).toContain(`context: '${path}'`); - } + expect(stdout).toContain('test-context-path'); }); }); diff --git a/test/core-flags/module-flags.test.js b/test/core-flags/module-flags.test.js index 16a30915555..99bc25c04ee 100644 --- a/test/core-flags/module-flags.test.js +++ b/test/core-flags/module-flags.test.js @@ -2,8 +2,8 @@ const { run, hyphenToUpperCase } = require('../utils/test-utils'); const { flagsFromCore } = require('../../packages/webpack-cli/lib/utils/cli-flags'); - -const moduleFlags = flagsFromCore.filter(({ name }) => name.startsWith('module-')); +//--module-rules-options will be exluded for cli. +const moduleFlags = flagsFromCore.filter(({ name }) => name.startsWith('module-') && name !== 'module-rules-options'); describe('module config related flag', () => { moduleFlags.forEach((flag) => { @@ -61,16 +61,6 @@ describe('module config related flag', () => { } else if (propName === 'enforce') { stdout = run(__dirname, [`--${flag.name}`, 'pre', '--module-rules-use-loader', 'myLoader']).stdout; expect(stdout).toContain(`${propName}: 'pre'`); - } else if (flag.name === 'module-rules-options') { - stdout = run(__dirname, [ - `--module-rules-test`, - '/.js$/', - '--module-rules-loader', - 'myLoader', - '--module-rules-options', - 'presets', - ]).stdout; - expect(stdout).toContain('presets'); } else { stdout = run(__dirname, [`--${flag.name}`, '/rules-value']).stdout; expect(stdout).toContain('rules-value'); From 4d0e8d8b2464657fec0a26da3b3607648deac707 Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Tue, 28 Jul 2020 21:05:10 +0530 Subject: [PATCH 18/21] fix: Update test/core-flags/cache-flags.test.js Co-authored-by: James George --- test/core-flags/cache-flags.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/core-flags/cache-flags.test.js b/test/core-flags/cache-flags.test.js index 2b827c6f120..c98b82d2f31 100644 --- a/test/core-flags/cache-flags.test.js +++ b/test/core-flags/cache-flags.test.js @@ -2,7 +2,7 @@ const { run } = require('../utils/test-utils'); -describe('cahche related flags from core', () => { +describe('cache related flags from core', () => { it('should be successful with --cache ', () => { const { stderr, stdout } = run(__dirname, ['--cache']); From 286847fa27ba497e00fc842f70a485f764c8ccd4 Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Wed, 29 Jul 2020 07:25:50 +0530 Subject: [PATCH 19/21] refactor: Update packages/webpack-cli/lib/utils/cli-flags.js --- packages/webpack-cli/lib/utils/cli-flags.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/webpack-cli/lib/utils/cli-flags.js b/packages/webpack-cli/lib/utils/cli-flags.js index bcb0e549027..7482d27179c 100644 --- a/packages/webpack-cli/lib/utils/cli-flags.js +++ b/packages/webpack-cli/lib/utils/cli-flags.js @@ -273,5 +273,5 @@ module.exports = { group: BASIC_GROUP } */ ], - flagsFromCore: [...flagsFromCore], + flagsFromCore: ...flagsFromCore, }; From f7bd48145e2aec5a053d60d0fb7a3f1dabf42658 Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Wed, 29 Jul 2020 09:23:58 +0530 Subject: [PATCH 20/21] fix: Update packages/webpack-cli/lib/utils/cli-flags.js --- packages/webpack-cli/lib/utils/cli-flags.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/webpack-cli/lib/utils/cli-flags.js b/packages/webpack-cli/lib/utils/cli-flags.js index 7482d27179c..b4386be5338 100644 --- a/packages/webpack-cli/lib/utils/cli-flags.js +++ b/packages/webpack-cli/lib/utils/cli-flags.js @@ -273,5 +273,5 @@ module.exports = { group: BASIC_GROUP } */ ], - flagsFromCore: ...flagsFromCore, + flagsFromCore: flagsFromCore, }; From 1b9f555c9cc1d632a4cb8eda6379c0bda22f6c1a Mon Sep 17 00:00:00 2001 From: James George Date: Wed, 29 Jul 2020 13:48:35 +0530 Subject: [PATCH 21/21] fix: apply suggestions from code review --- packages/webpack-cli/lib/utils/cli-flags.js | 4 ++-- test/core-flags/module-flags.test.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/webpack-cli/lib/utils/cli-flags.js b/packages/webpack-cli/lib/utils/cli-flags.js index b4386be5338..9474919c3f1 100644 --- a/packages/webpack-cli/lib/utils/cli-flags.js +++ b/packages/webpack-cli/lib/utils/cli-flags.js @@ -8,7 +8,7 @@ const ADVANCED_GROUP = 'advanced'; const DISPLAY_GROUP = 'stats'; const ZERO_CONFIG_GROUP = 'zero-config'; -// Extract all the flages being exported from core. A list of cli flags generated by core +// Extract all the flags being exported from core. A list of cli flags generated by core // can be found here https://github.com/webpack/webpack/blob/master/test/__snapshots__/Cli.test.js.snap let flagsFromCore = typeof cli !== 'undefined' @@ -273,5 +273,5 @@ module.exports = { group: BASIC_GROUP } */ ], - flagsFromCore: flagsFromCore, + flagsFromCore, }; diff --git a/test/core-flags/module-flags.test.js b/test/core-flags/module-flags.test.js index 99bc25c04ee..3fa3034902c 100644 --- a/test/core-flags/module-flags.test.js +++ b/test/core-flags/module-flags.test.js @@ -2,7 +2,7 @@ const { run, hyphenToUpperCase } = require('../utils/test-utils'); const { flagsFromCore } = require('../../packages/webpack-cli/lib/utils/cli-flags'); -//--module-rules-options will be exluded for cli. +//--module-rules-options will be excluded for cli. const moduleFlags = flagsFromCore.filter(({ name }) => name.startsWith('module-') && name !== 'module-rules-options'); describe('module config related flag', () => {