Skip to content

Commit bb61461

Browse files
docs: update (#4390)
1 parent c239734 commit bb61461

File tree

2 files changed

+26
-13
lines changed

2 files changed

+26
-13
lines changed

OPTIONS.md

+21-9
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,12 @@ Options:
1010
-m, --merge Merge two or more configurations using 'webpack-merge'.
1111
--disable-interpret Disable interpret for loading the config file.
1212
--env <value...> Environment variables passed to the configuration when it is a function, e.g. "myvar" or "myvar=myval".
13-
--node-env <value> Sets process.env.NODE_ENV to the specified value.
14-
--define-process-env-node-env <value> Sets process.env.NODE_ENV to the specified value. (Currently an alias for `--node-env`).
13+
--node-env <value> Sets process.env.NODE_ENV to the specified value for access within the configuration.(Deprecated: Use '--config-node-env' instead)
14+
--config-node-env <value> Sets process.env.NODE_ENV to the specified value for access within the configuration.
1515
--analyze It invokes webpack-bundle-analyzer plugin to get bundle information.
1616
--progress [value] Print compilation progress during build.
1717
-j, --json [pathToJsonFile] Prints result as JSON or store it in a file.
1818
--fail-on-warnings Stop webpack-cli process with non-zero exit code on warnings from webpack.
19-
-e, --extends <value...> Path to the configuration to be extended (only works when using webpack-cli).
2019
--no-amd Negative 'amd' option.
2120
--bail Report the first error as a hard error instead of tolerating it.
2221
--no-bail Negative 'bail' option.
@@ -99,7 +98,7 @@ Options:
9998
--no-experiments-sync-web-assembly Negative 'experiments-sync-web-assembly' option.
10099
--experiments-top-level-await Allow using top-level-await in EcmaScript Modules.
101100
--no-experiments-top-level-await Negative 'experiments-top-level-await' option.
102-
--extends <value...> Path to the configuration to be extended (only works when using webpack-cli).
101+
-e, --extends <value...> Path to the configuration to be extended (only works when using webpack-cli).
103102
--extends-reset Clear all items provided in 'extends' configuration. Extend configuration from another configuration (only works when using webpack-cli).
104103
--externals <value...> Every matched dependency becomes external. An exact matched dependency becomes external. The same string is used as external dependency.
105104
--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`.
@@ -188,14 +187,30 @@ Options:
188187
--module-no-parse <value...> A regular expression, when matched the module is not parsed. An absolute path, when the module starts with this path it is not parsed.
189188
--module-no-parse-reset Clear all items provided in 'module.noParse' configuration. Don't parse files matching. It's matched against the full resolved request.
190189
--module-parser-asset-data-url-condition-max-size <value> Maximum size of asset that should be inline as modules. Default: 8kb.
190+
--module-parser-css-import Enable/disable `@import` at-rules handling.
191+
--no-module-parser-css-import Negative 'module-parser-css-import' option.
191192
--module-parser-css-named-exports Use ES modules named export for css exports.
192193
--no-module-parser-css-named-exports Negative 'module-parser-css-named-exports' option.
194+
--module-parser-css-url Enable/disable `url()`/`image-set()`/`src()`/`image()` functions handling.
195+
--no-module-parser-css-url Negative 'module-parser-css-url' option.
196+
--module-parser-css-auto-import Enable/disable `@import` at-rules handling.
197+
--no-module-parser-css-auto-import Negative 'module-parser-css-auto-import' option.
193198
--module-parser-css-auto-named-exports Use ES modules named export for css exports.
194199
--no-module-parser-css-auto-named-exports Negative 'module-parser-css-auto-named-exports' option.
200+
--module-parser-css-auto-url Enable/disable `url()`/`image-set()`/`src()`/`image()` functions handling.
201+
--no-module-parser-css-auto-url Negative 'module-parser-css-auto-url' option.
202+
--module-parser-css-global-import Enable/disable `@import` at-rules handling.
203+
--no-module-parser-css-global-import Negative 'module-parser-css-global-import' option.
195204
--module-parser-css-global-named-exports Use ES modules named export for css exports.
196205
--no-module-parser-css-global-named-exports Negative 'module-parser-css-global-named-exports' option.
206+
--module-parser-css-global-url Enable/disable `url()`/`image-set()`/`src()`/`image()` functions handling.
207+
--no-module-parser-css-global-url Negative 'module-parser-css-global-url' option.
208+
--module-parser-css-module-import Enable/disable `@import` at-rules handling.
209+
--no-module-parser-css-module-import Negative 'module-parser-css-module-import' option.
197210
--module-parser-css-module-named-exports Use ES modules named export for css exports.
198211
--no-module-parser-css-module-named-exports Negative 'module-parser-css-module-named-exports' option.
212+
--module-parser-css-module-url Enable/disable `url()`/`image-set()`/`src()`/`image()` functions handling.
213+
--no-module-parser-css-module-url Negative 'module-parser-css-module-url' option.
199214
--no-module-parser-javascript-amd Negative 'module-parser-javascript-amd' option.
200215
--module-parser-javascript-browserify Enable/disable special handling for browserify bundles.
201216
--no-module-parser-javascript-browserify Negative 'module-parser-javascript-browserify' option.
@@ -563,6 +578,8 @@ Options:
563578
--no-node-filename Negative 'node-filename' option.
564579
--node-global [value] Include a polyfill for the 'global' variable.
565580
--no-node-global Negative 'node-global' option.
581+
--optimization-avoid-entry-iife Avoid wrapping the entry module in an IIFE.
582+
--no-optimization-avoid-entry-iife Negative 'optimization-avoid-entry-iife' option.
566583
--optimization-check-wasm-types Check for incompatible wasm types when importing/exporting from/to ESM.
567584
--no-optimization-check-wasm-types Negative 'optimization-check-wasm-types' option.
568585
--optimization-chunk-ids <value> 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).
@@ -656,8 +673,6 @@ Options:
656673
--no-output-cross-origin-loading Negative 'output-cross-origin-loading' option.
657674
--output-css-chunk-filename <value> Specifies the filename template of output files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
658675
--output-css-filename <value> Specifies the filename template of output files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
659-
--output-css-head-data-compression Compress the data in the head tag of CSS files.
660-
--no-output-css-head-data-compression Negative 'output-css-head-data-compression' option.
661676
--output-devtool-fallback-module-filename-template <value> Similar to `output.devtoolModuleFilenameTemplate`, but used in the case of duplicate module identifiers.
662677
--output-devtool-module-filename-template <value> Filename template string of function for the sources array in a generated SourceMap.
663678
--output-devtool-namespace <value> 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.
@@ -1075,9 +1090,6 @@ Commands:
10751090
configtest|t [config-path] Validate a webpack configuration.
10761091
help|h [command] [option] Display help for commands and options.
10771092
info|i [options] Outputs information about your system.
1078-
init|create|new|c|n [generation-path] [options] Initialize a new webpack project.
1079-
loader|l [output-path] [options] Scaffold a loader.
1080-
plugin|p [output-path] [options] Scaffold a plugin.
10811093
serve|server|s [entries...] [options] Run the webpack dev server and watch for source file changes while serving.
10821094
version|v [options] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands.
10831095
watch|w [entries...] [options] Run webpack and watch for files changes.

SERVE-OPTIONS-v5.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,16 @@ Options:
99
-m, --merge Merge two or more configurations using 'webpack-merge'.
1010
--disable-interpret Disable interpret for loading the config file.
1111
--env <value...> Environment variables passed to the configuration when it is a function, e.g. "myvar" or "myvar=myval".
12-
--node-env <value> Sets process.env.NODE_ENV to the specified value.
12+
--node-env <value> Sets process.env.NODE_ENV to the specified value for access within the configuration.(Deprecated: Use '--config-node-env' instead)
13+
--config-node-env <value> Sets process.env.NODE_ENV to the specified value for access within the configuration.
1314
--analyze It invokes webpack-bundle-analyzer plugin to get bundle information.
1415
--progress [value] Print compilation progress during build.
1516
-j, --json [pathToJsonFile] Prints result as JSON or store it in a file.
1617
--fail-on-warnings Stop webpack-cli process with non-zero exit code on warnings from webpack.
17-
-e, --extends <value...> Path to the configuration to be extended (only works when using webpack-cli).
1818
-d, --devtool <value> A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).
1919
--no-devtool Negative 'devtool' option.
2020
--entry <value...> A module that is loaded upon startup. Only the last one is exported.
21+
-e, --extends <value...> Path to the configuration to be extended (only works when using webpack-cli).
2122
--mode <value> Enable production optimizations or development hints.
2223
--name <value> Name of the configuration. Used when loading multiple configurations.
2324
-o, --output-path <value> The output directory as **absolute path** (required).
@@ -44,8 +45,8 @@ Options:
4445
--client-overlay-runtime-errors Enables a full-screen overlay in the browser when there are uncaught runtime errors.
4546
--no-client-overlay-runtime-errors Disables the full-screen overlay in the browser when there are uncaught runtime errors.
4647
--client-overlay-trusted-types-policy-name <value> The name of a Trusted Types policy for the overlay. Defaults to 'webpack-dev-server#overlay'.
47-
--client-progress Prints compilation progress in percentage in the browser.
48-
--no-client-progress Does not print compilation progress in percentage in the browser.
48+
--client-progress [value] Displays compilation progress in the browser. Options include 'linear' and 'circular' for visual indicators.
49+
--no-client-progress Does not display compilation progress in the browser.
4950
--client-reconnect [value] Tells dev-server the number of times it should try to reconnect the client.
5051
--no-client-reconnect Tells dev-server to not to try to reconnect the client.
5152
--client-web-socket-transport <value> Allows to set custom web socket transport to communicate with dev server.

0 commit comments

Comments
 (0)