diff --git a/OPTIONS.md b/OPTIONS.md index a638429def9..8147afa51f6 100644 --- a/OPTIONS.md +++ b/OPTIONS.md @@ -47,6 +47,8 @@ Options: --cache-name Name for the cache. Different names will lead to different coexisting caches. --cache-profile Track and log detailed timing information for individual cache items. --no-cache-profile Negative 'cache-profile' option. + --cache-readonly Enable/disable readonly mode. + --no-cache-readonly Negative 'cache-readonly' option. --cache-store When to store data to the filesystem. (pack: Store data when compiler is idle in a single file). --cache-version 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 The base directory (absolute path!) for resolving the `entry` option. If `output.pathinfo` is set, the included pathinfo is shortened to this directory. @@ -98,7 +100,6 @@ Options: --no-experiments-sync-web-assembly Negative 'experiments-sync-web-assembly' option. --experiments-top-level-await Allow using top-level-await in EcmaScript Modules. --no-experiments-top-level-await Negative 'experiments-top-level-await' option. - --extends Path to the configuration to be extended (only works when using webpack-cli). --extends-reset Clear all items provided in 'extends' configuration. Extend configuration from another configuration (only works when using webpack-cli). --externals 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 'externals' 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`. @@ -168,6 +169,8 @@ Options: --no-module-parser-javascript-commonjs-magic-comments Negative 'module-parser-javascript-commonjs-magic-comments' option. --module-parser-javascript-create-require [value] Enable/disable parsing "import { createRequire } from "module"" and evaluating createRequire(). --no-module-parser-javascript-create-require Negative 'module-parser-javascript-create-require' option. + --module-parser-javascript-dynamic-import-fetch-priority Specifies global fetchPriority for dynamic import. + --no-module-parser-javascript-dynamic-import-fetch-priority Negative 'module-parser-javascript-dynamic-import-fetch-priority' option. --module-parser-javascript-dynamic-import-mode Specifies global mode for dynamic import. --module-parser-javascript-dynamic-import-prefetch [value] Specifies global prefetch for dynamic import. --no-module-parser-javascript-dynamic-import-prefetch Negative 'module-parser-javascript-dynamic-import-prefetch' option. @@ -241,6 +244,8 @@ Options: --no-module-parser-javascript-auto-commonjs-magic-comments Negative 'module-parser-javascript-auto-commonjs-magic-comments' option. --module-parser-javascript-auto-create-require [value] Enable/disable parsing "import { createRequire } from "module"" and evaluating createRequire(). --no-module-parser-javascript-auto-create-require Negative 'module-parser-javascript-auto-create-require' option. + --module-parser-javascript-auto-dynamic-import-fetch-priority Specifies global fetchPriority for dynamic import. + --no-module-parser-javascript-auto-dynamic-import-fetch-priority Negative 'module-parser-javascript-auto-dynamic-import-fetch-priority' option. --module-parser-javascript-auto-dynamic-import-mode Specifies global mode for dynamic import. --module-parser-javascript-auto-dynamic-import-prefetch [value] Specifies global prefetch for dynamic import. --no-module-parser-javascript-auto-dynamic-import-prefetch Negative 'module-parser-javascript-auto-dynamic-import-prefetch' option. @@ -314,6 +319,8 @@ Options: --no-module-parser-javascript-dynamic-commonjs-magic-comments Negative 'module-parser-javascript-dynamic-commonjs-magic-comments' option. --module-parser-javascript-dynamic-create-require [value] Enable/disable parsing "import { createRequire } from "module"" and evaluating createRequire(). --no-module-parser-javascript-dynamic-create-require Negative 'module-parser-javascript-dynamic-create-require' option. + --module-parser-javascript-dynamic-dynamic-import-fetch-priority Specifies global fetchPriority for dynamic import. + --no-module-parser-javascript-dynamic-dynamic-import-fetch-priority Negative 'module-parser-javascript-dynamic-dynamic-import-fetch-priority' option. --module-parser-javascript-dynamic-dynamic-import-mode Specifies global mode for dynamic import. --module-parser-javascript-dynamic-dynamic-import-prefetch [value] Specifies global prefetch for dynamic import. --no-module-parser-javascript-dynamic-dynamic-import-prefetch Negative 'module-parser-javascript-dynamic-dynamic-import-prefetch' option. @@ -387,6 +394,8 @@ Options: --no-module-parser-javascript-esm-commonjs-magic-comments Negative 'module-parser-javascript-esm-commonjs-magic-comments' option. --module-parser-javascript-esm-create-require [value] Enable/disable parsing "import { createRequire } from "module"" and evaluating createRequire(). --no-module-parser-javascript-esm-create-require Negative 'module-parser-javascript-esm-create-require' option. + --module-parser-javascript-esm-dynamic-import-fetch-priority Specifies global fetchPriority for dynamic import. + --no-module-parser-javascript-esm-dynamic-import-fetch-priority Negative 'module-parser-javascript-esm-dynamic-import-fetch-priority' option. --module-parser-javascript-esm-dynamic-import-mode Specifies global mode for dynamic import. --module-parser-javascript-esm-dynamic-import-prefetch [value] Specifies global prefetch for dynamic import. --no-module-parser-javascript-esm-dynamic-import-prefetch Negative 'module-parser-javascript-esm-dynamic-import-prefetch' option. @@ -626,8 +635,12 @@ Options: --no-output-environment-destructuring Negative 'output-environment-destructuring' option. --output-environment-dynamic-import The environment supports an async import() function to import EcmaScript modules. --no-output-environment-dynamic-import Negative 'output-environment-dynamic-import' option. + --output-environment-dynamic-import-in-worker The environment supports an async import() is available when creating a worker. + --no-output-environment-dynamic-import-in-worker Negative 'output-environment-dynamic-import-in-worker' option. --output-environment-for-of The environment supports 'for of' iteration ('for (const x of array) { ... }'). --no-output-environment-for-of Negative 'output-environment-for-of' option. + --output-environment-global-this The environment supports 'globalThis'. + --no-output-environment-global-this Negative 'output-environment-global-this' option. --output-environment-module The environment supports EcmaScript Module syntax to import EcmaScript modules (import ... from '...'). --no-output-environment-module Negative 'output-environment-module' option. --output-environment-optional-chaining The environment supports optional chaining ('obj?.a' or 'obj?.()'). diff --git a/SERVE-OPTIONS-v4.md b/SERVE-OPTIONS-v4.md index 100364c7451..7c1f16514f7 100644 --- a/SERVE-OPTIONS-v4.md +++ b/SERVE-OPTIONS-v4.md @@ -18,7 +18,6 @@ Options: -d, --devtool A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map). --no-devtool Negative 'devtool' option. --entry A module that is loaded upon startup. Only the last one is exported. - --extends Path to the configuration to be extended (only works when using webpack-cli). --mode Enable production optimizations or development hints. --name Name of the configuration. Used when loading multiple configurations. -o, --output-path The output directory as **absolute path** (required). diff --git a/packages/webpack-cli/src/webpack-cli.ts b/packages/webpack-cli/src/webpack-cli.ts index 6a58dfd947e..c274a5e2d9a 100644 --- a/packages/webpack-cli/src/webpack-cli.ts +++ b/packages/webpack-cli/src/webpack-cli.ts @@ -1052,6 +1052,7 @@ class WebpackCLI implements IWebpackCLI { }, ]; + // Options from webpack core to be included in the minimum help output const minimumHelpFlags = [ "mode", "watch", @@ -1062,7 +1063,6 @@ class WebpackCLI implements IWebpackCLI { "target", "name", "output-path", - "extends", ]; // Extract all the flags being exported from core. diff --git a/test/help/__snapshots__/help.test.js.snap.devServer4.webpack5 b/test/help/__snapshots__/help.test.js.snap.devServer4.webpack5 index af6dbd3a74c..87ab0e863ef 100644 --- a/test/help/__snapshots__/help.test.js.snap.devServer4.webpack5 +++ b/test/help/__snapshots__/help.test.js.snap.devServer4.webpack5 @@ -108,7 +108,6 @@ Options: -d, --devtool A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map). --no-devtool Negative 'devtool' option. --entry A module that is loaded upon startup. Only the last one is exported. - --extends Path to the configuration to be extended (only works when using webpack-cli). --mode Enable production optimizations or development hints. --name Name of the configuration. Used when loading multiple configurations. -o, --output-path The output directory as **absolute path** (required). @@ -169,7 +168,6 @@ Options: -d, --devtool A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map). --no-devtool Negative 'devtool' option. --entry A module that is loaded upon startup. Only the last one is exported. - --extends Path to the configuration to be extended (only works when using webpack-cli). --mode Enable production optimizations or development hints. --name Name of the configuration. Used when loading multiple configurations. -o, --output-path The output directory as **absolute path** (required). @@ -230,7 +228,6 @@ Options: -d, --devtool A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map). --no-devtool Negative 'devtool' option. --entry A module that is loaded upon startup. Only the last one is exported. - --extends Path to the configuration to be extended (only works when using webpack-cli). --mode Enable production optimizations or development hints. --name Name of the configuration. Used when loading multiple configurations. -o, --output-path The output directory as **absolute path** (required). @@ -290,7 +287,6 @@ Options: -d, --devtool A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map). --no-devtool Negative 'devtool' option. --entry A module that is loaded upon startup. Only the last one is exported. - --extends Path to the configuration to be extended (only works when using webpack-cli). --mode Enable production optimizations or development hints. --name Name of the configuration. Used when loading multiple configurations. -o, --output-path The output directory as **absolute path** (required). @@ -338,7 +334,6 @@ Options: -d, --devtool A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map). --no-devtool Negative 'devtool' option. --entry A module that is loaded upon startup. Only the last one is exported. - --extends Path to the configuration to be extended (only works when using webpack-cli). --mode Enable production optimizations or development hints. --name Name of the configuration. Used when loading multiple configurations. -o, --output-path The output directory as **absolute path** (required). @@ -402,8 +397,6 @@ Options: --no-devtool Negative 'devtool' option. --entry A module that is loaded upon startup. Only the last one is exported. - --extends Path to the configuration to be extended - (only works when using webpack-cli). --mode Enable production optimizations or development hints. --name Name of the configuration. Used when @@ -476,8 +469,6 @@ Options: --no-devtool Negative 'devtool' option. --entry A module that is loaded upon startup. Only the last one is exported. - --extends Path to the configuration to be extended - (only works when using webpack-cli). --mode Enable production optimizations or development hints. --name Name of the configuration. Used when @@ -534,7 +525,6 @@ Options: -d, --devtool A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map). --no-devtool Negative 'devtool' option. --entry A module that is loaded upon startup. Only the last one is exported. - --extends Path to the configuration to be extended (only works when using webpack-cli). --mode Enable production optimizations or development hints. --name Name of the configuration. Used when loading multiple configurations. -o, --output-path The output directory as **absolute path** (required). @@ -582,7 +572,6 @@ Options: -d, --devtool A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map). --no-devtool Negative 'devtool' option. --entry A module that is loaded upon startup. Only the last one is exported. - --extends Path to the configuration to be extended (only works when using webpack-cli). --mode Enable production optimizations or development hints. --name Name of the configuration. Used when loading multiple configurations. -o, --output-path The output directory as **absolute path** (required). @@ -1564,7 +1553,6 @@ Options: -d, --devtool A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map). --no-devtool Negative 'devtool' option. --entry A module that is loaded upon startup. Only the last one is exported. - --extends Path to the configuration to be extended (only works when using webpack-cli). --mode Enable production optimizations or development hints. --name Name of the configuration. Used when loading multiple configurations. -o, --output-path The output directory as **absolute path** (required). @@ -1610,7 +1598,6 @@ Options: -d, --devtool A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map). --no-devtool Negative 'devtool' option. --entry A module that is loaded upon startup. Only the last one is exported. - --extends Path to the configuration to be extended (only works when using webpack-cli). --mode Enable production optimizations or development hints. --name Name of the configuration. Used when loading multiple configurations. -o, --output-path The output directory as **absolute path** (required). @@ -1672,8 +1659,6 @@ Options: --no-devtool Negative 'devtool' option. --entry A module that is loaded upon startup. Only the last one is exported. - --extends Path to the configuration to be extended - (only works when using webpack-cli). --mode Enable production optimizations or development hints. --name Name of the configuration. Used when @@ -1743,8 +1728,6 @@ Options: --no-devtool Negative 'devtool' option. --entry A module that is loaded upon startup. Only the last one is exported. - --extends Path to the configuration to be extended - (only works when using webpack-cli). --mode Enable production optimizations or development hints. --name Name of the configuration. Used when @@ -1798,7 +1781,6 @@ Options: -d, --devtool A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map). --no-devtool Negative 'devtool' option. --entry A module that is loaded upon startup. Only the last one is exported. - --extends Path to the configuration to be extended (only works when using webpack-cli). --mode Enable production optimizations or development hints. --name Name of the configuration. Used when loading multiple configurations. -o, --output-path The output directory as **absolute path** (required). @@ -1844,7 +1826,6 @@ Options: -d, --devtool A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map). --no-devtool Negative 'devtool' option. --entry A module that is loaded upon startup. Only the last one is exported. - --extends Path to the configuration to be extended (only works when using webpack-cli). --mode Enable production optimizations or development hints. --name Name of the configuration. Used when loading multiple configurations. -o, --output-path The output directory as **absolute path** (required). @@ -1891,7 +1872,6 @@ Options: -d, --devtool A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map). --no-devtool Negative 'devtool' option. --entry A module that is loaded upon startup. Only the last one is exported. - --extends Path to the configuration to be extended (only works when using webpack-cli). --mode Enable production optimizations or development hints. --name Name of the configuration. Used when loading multiple configurations. -o, --output-path The output directory as **absolute path** (required). @@ -1952,7 +1932,6 @@ Options: -d, --devtool A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map). --no-devtool Negative 'devtool' option. --entry A module that is loaded upon startup. Only the last one is exported. - --extends Path to the configuration to be extended (only works when using webpack-cli). --mode Enable production optimizations or development hints. --name Name of the configuration. Used when loading multiple configurations. -o, --output-path The output directory as **absolute path** (required). @@ -2203,7 +2182,6 @@ Options: -d, --devtool A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map). --no-devtool Negative 'devtool' option. --entry A module that is loaded upon startup. Only the last one is exported. - --extends Path to the configuration to be extended (only works when using webpack-cli). --mode Enable production optimizations or development hints. --name Name of the configuration. Used when loading multiple configurations. -o, --output-path The output directory as **absolute path** (required). @@ -2262,7 +2240,6 @@ Options: -d, --devtool A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map). --no-devtool Negative 'devtool' option. --entry A module that is loaded upon startup. Only the last one is exported. - --extends Path to the configuration to be extended (only works when using webpack-cli). --mode Enable production optimizations or development hints. --name Name of the configuration. Used when loading multiple configurations. -o, --output-path The output directory as **absolute path** (required).