diff --git a/OPTIONS.md b/OPTIONS.md index 341b0d5ad71..34dfa73e833 100644 --- a/OPTIONS.md +++ b/OPTIONS.md @@ -72,7 +72,7 @@ Options --dotenv-template-reset Clear all items provided in 'dotenv.template' configuration. Template patterns for .env file names. Use [mode] as placeholder for the webpack mode. Defaults to ['.env', '.env.local', '.env.[mode]', '.env.[mode].local']. --entry A module that is loaded upon startup. Only the last one is exported. --entry-reset Clear all items provided in 'entry' configuration. All modules are loaded upon startup. The last one is exported. - --experiments-async-web-assembly Support WebAssembly as asynchronous EcmaScript Module. + --experiments-async-web-assembly [value] Enable the built-in async WebAssembly support only when no loader is registered for WebAssembly files. Enable/disable the built-in async WebAssembly support. --no-experiments-async-web-assembly Negative 'experiments-async-web-assembly' option. --experiments-back-compat Enable backward-compat layer with deprecation warnings for many webpack 4 APIs. --no-experiments-back-compat Negative 'experiments-back-compat' option. @@ -88,13 +88,13 @@ Options --no-experiments-build-http-upgrade Negative 'experiments-build-http-upgrade' option. --experiments-cache-unaffected Enable additional in memory caching of modules that are unchanged and reference only unchanged modules. --no-experiments-cache-unaffected Negative 'experiments-cache-unaffected' option. - --experiments-css Enable css support. + --experiments-css [value] Enable the built-in CSS support only when no loader is registered for CSS files. Enable/disable the built-in CSS support. --no-experiments-css Negative 'experiments-css' option. --experiments-defer-import Enable experimental tc39 proposal https://github.com/tc39/proposal-defer-import-eval. This allows to defer execution of a module until it's first use. --no-experiments-defer-import Negative 'experiments-defer-import' option. --experiments-future-defaults Apply defaults of next major version. --no-experiments-future-defaults Negative 'experiments-future-defaults' option. - --experiments-html Enable HTML entry support. Treats `.html` files as a first-class module type so they can be used directly as entry points. + --experiments-html [value] Enable the built-in HTML support only when no loader is registered for HTML files. Enable/disable the built-in HTML support. --no-experiments-html Negative 'experiments-html' option. --experiments-lazy-compilation Compile entrypoints and import()s only when they are accessed. --no-experiments-lazy-compilation Negative 'experiments-lazy-compilation' option. @@ -114,7 +114,7 @@ Options --no-experiments-source-import Negative 'experiments-source-import' option. --experiments-sync-web-assembly Support WebAssembly as synchronous EcmaScript Module (outdated). --no-experiments-sync-web-assembly Negative 'experiments-sync-web-assembly' option. - --experiments-typescript Enable typescript support. + --experiments-typescript [value] Enable the built-in TypeScript support only when Node.js supports it (>= 22.6) and no loader is registered for TypeScript files. Enable/disable the built-in TypeScript support. --no-experiments-typescript Negative 'experiments-typescript' option. -e, --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). @@ -134,6 +134,10 @@ Options --no-externals-presets-electron-renderer Negative 'externals-presets-electron-renderer' option. --externals-presets-node Treat node.js built-in modules like fs, path or vm as external and load them via require() when used. --no-externals-presets-node Negative 'externals-presets-node' option. + --externals-presets-node-modules Enable or disable externalizing installed packages. + --no-externals-presets-node-modules Negative 'externals-presets-node-modules' option. + --externals-presets-node-modules-allowlist Requests matching the RegExp stay bundled. An exact request that should stay bundled. + --externals-presets-node-modules-allowlist-reset Clear all items provided in 'externalsPresets.nodeModules.allowlist' configuration. Keep these requests bundled instead of externalizing them. --externals-presets-nwjs Treat NW.js legacy nw.gui module as external and load it via require() when used. --no-externals-presets-nwjs Negative 'externals-presets-nwjs' option. --externals-presets-web Treat references to 'http(s)://...' and 'std:...' as external and load them via import when used (Note that this changes execution order as externals are executed before any other code in the chunk). @@ -154,6 +158,8 @@ Options --no-infrastructure-logging-debug Negative 'infrastructure-logging-debug' option. --infrastructure-logging-debug-reset Clear all items provided in 'infrastructureLogging.debug' configuration. Enable debug logging for specific loggers. --infrastructure-logging-level Log level. + --infrastructure-logging-progress [value] Show build progress. `"auto"` shows it only for interactive terminals. This option is only used when no custom console is provided. + --no-infrastructure-logging-progress Negative 'infrastructure-logging-progress' option. --mode Enable production optimizations or development hints. --module-expr-context-critical Enable warnings for full dynamic dependencies. --no-module-expr-context-critical Negative 'module-expr-context-critical' option. @@ -229,13 +235,41 @@ Options --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. --module-parser-asset-data-url-condition-max-size Maximum size of asset that should be inline as modules. Default: 8kb. --module-parser-css-as Configure how the CSS source is parsed: as a full stylesheet (default) or as a block's contents (e.g. the content of an HTML `style` attribute). + --module-parser-css-custom-media Enable/disable resolution of `@custom-media` at-rules (file-local build-time substitution). + --no-module-parser-css-custom-media Negative 'module-parser-css-custom-media' option. + --module-parser-css-custom-selectors Enable/disable resolution of `@custom-selector` at-rules (file-local build-time expansion to `:is(...)`). + --no-module-parser-css-custom-selectors Negative 'module-parser-css-custom-selectors' option. --module-parser-css-export-type Configure how CSS content is exported as default. + --module-parser-css-font-preload Auto-emit `` for the primary `src` URL of each `@font-face` reachable from an HTML entry's initial CSS. Only the first URL per `@font-face` is preloaded (preloading every format would double-download). Off by default; `parser.css.urlHints` rules and per-URL magic comments still override the seeded defaults. Set `output.crossOriginLoading` so the preload matches the font's CORS fetch. + --no-module-parser-css-font-preload Negative 'module-parser-css-font-preload' option. --module-parser-css-import Enable/disable `@import` at-rules handling. --no-module-parser-css-import Negative 'module-parser-css-import' option. --module-parser-css-named-exports Use ES modules named export for css exports. --no-module-parser-css-named-exports Negative 'module-parser-css-named-exports' option. --module-parser-css-url Enable/disable `url()`/`image-set()`/`src()`/`image()` functions handling. --no-module-parser-css-url Negative 'module-parser-css-url' option. + --module-parser-css-url-hints-as Default `as` attribute (script / style / font / image / …). + --module-parser-css-url-hints-exclude One default-hint rule for URL-referenced assets emitted by this parser (JS `new URL(...)`, CSS `url(...)`, HTML `` / `` / `