Skip to content

Commit 4650e66

Browse files
authored
docs: update webpack options (#3101)
1 parent a59de98 commit 4650e66

File tree

3 files changed

+20
-12
lines changed

3 files changed

+20
-12
lines changed

OPTIONS.md

+10-2
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ Options:
7070
--no-experiments-build-http-upgrade Negative 'experiments-build-http-upgrade' option.
7171
--experiments-cache-unaffected Enable additional in memory caching of modules that are unchanged and reference only unchanged modules.
7272
--no-experiments-cache-unaffected Negative 'experiments-cache-unaffected' option.
73+
--experiments-css Enable css support.
74+
--no-experiments-css Negative 'experiments-css' option.
75+
--experiments-css-exports-only Avoid generating and loading a stylesheet and only embed exports from css into output javascript files.
76+
--no-experiments-css-exports-only Negative 'experiments-css-exports-only' option.
7377
--experiments-future-defaults Apply defaults of next major version.
7478
--no-experiments-future-defaults Negative 'experiments-future-defaults' option.
7579
--experiments-layers Enable module layers.
@@ -138,13 +142,15 @@ Options:
138142
--module-generator-asset-emit Emit an output asset from this asset module. This can be set to 'false' to omit emitting e. g. for SSR.
139143
--no-module-generator-asset-emit Negative 'module-generator-asset-emit' option.
140144
--module-generator-asset-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.
145+
--module-generator-asset-output-path <value> Emit the asset in the specified folder relative to 'output.path'. This should only be needed when custom 'publicPath' is specified to match the folder structure there.
141146
--module-generator-asset-public-path <value> The 'publicPath' specifies the public URL address of the output files when referenced in a browser.
142147
--module-generator-asset-inline-data-url-encoding <value> Asset encoding (defaults to base64).
143148
--no-module-generator-asset-inline-data-url-encoding Negative 'module-generator-asset-inline-data-url-encoding' option.
144149
--module-generator-asset-inline-data-url-mimetype <value> Asset mimetype (getting from file extension by default).
145150
--module-generator-asset-resource-emit Emit an output asset from this asset module. This can be set to 'false' to omit emitting e. g. for SSR.
146151
--no-module-generator-asset-resource-emit Negative 'module-generator-asset-resource-emit' option.
147152
--module-generator-asset-resource-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.
153+
--module-generator-asset-resource-output-path <value> Emit the asset in the specified folder relative to 'output.path'. This should only be needed when custom 'publicPath' is specified to match the folder structure there.
148154
--module-generator-asset-resource-public-path <value> The 'publicPath' specifies the public URL address of the output files when referenced in a browser.
149155
--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.
150156
--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.
@@ -551,12 +557,14 @@ Options:
551557
--no-output-compare-before-emit Negative 'output-compare-before-emit' option.
552558
--output-cross-origin-loading <value> This option enables cross-origin loading of chunks.
553559
--no-output-cross-origin-loading Negative 'output-cross-origin-loading' option.
560+
--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.
561+
--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.
554562
--output-devtool-fallback-module-filename-template <value> Similar to `output.devtoolModuleFilenameTemplate`, but used in the case of duplicate module identifiers.
555563
--output-devtool-module-filename-template <value> Filename template string of function for the sources array in a generated SourceMap.
556564
--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.
557565
--output-enabled-chunk-loading-types <value...> The method of loading chunks (methods included by default are 'jsonp' (web), 'import' (ESM), 'importScripts' (WebWorker), 'require' (sync node.js), 'async-node' (async node.js), but others might be added by plugins).
558566
--output-enabled-chunk-loading-types-reset Clear all items provided in 'output.enabledChunkLoadingTypes' configuration. List of chunk loading types enabled for use by entry points.
559-
--output-enabled-library-types <value...> Type of library (types included by default are 'var', 'module', 'assign', 'assign-properties', 'this', 'window', 'self', 'global', 'commonjs', 'commonjs2', 'commonjs-module', 'amd', 'amd-require', 'umd', 'umd2', 'jsonp', 'system', but others might be added by plugins).
567+
--output-enabled-library-types <value...> Type of library (types included by default are 'var', 'module', 'assign', 'assign-properties', 'this', 'window', 'self', 'global', 'commonjs', 'commonjs2', 'commonjs-module', 'commonjs-static', 'amd', 'amd-require', 'umd', 'umd2', 'jsonp', 'system', but others might be added by plugins).
560568
--output-enabled-library-types-reset Clear all items provided in 'output.enabledLibraryTypes' configuration. List of library types enabled for use by entry points.
561569
--output-enabled-wasm-loading-types <value...> The method of loading WebAssembly Modules (methods included by default are 'fetch' (web/WebWorker), 'async-node' (node.js), but others might be added by plugins).
562570
--output-enabled-wasm-loading-types-reset Clear all items provided in 'output.enabledWasmLoadingTypes' configuration. List of wasm loading types enabled for use by entry points.
@@ -610,7 +618,7 @@ Options:
610618
--output-library-name-commonjs <value> Name of the exposed commonjs export in the UMD.
611619
--output-library-name-root <value...> Part of the name of the property exposed globally by a UMD library.
612620
--output-library-name-root-reset Clear all items provided in 'output.library.name.root' configuration. Name of the property exposed globally by a UMD library.
613-
--output-library-type <value> Type of library (types included by default are 'var', 'module', 'assign', 'assign-properties', 'this', 'window', 'self', 'global', 'commonjs', 'commonjs2', 'commonjs-module', 'amd', 'amd-require', 'umd', 'umd2', 'jsonp', 'system', but others might be added by plugins).
621+
--output-library-type <value> Type of library (types included by default are 'var', 'module', 'assign', 'assign-properties', 'this', 'window', 'self', 'global', 'commonjs', 'commonjs2', 'commonjs-module', 'commonjs-static', 'amd', 'amd-require', 'umd', 'umd2', 'jsonp', 'system', but others might be added by plugins).
614622
--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.
615623
--no-output-library-umd-named-define Negative 'output-library-umd-named-define' option.
616624
--output-module Output javascript files as module source type.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
"ts-jest": "^27.0.2",
8383
"ts-node": "^9.1.0",
8484
"typescript": "^4.1.3",
85-
"webpack": "^5.56.0",
85+
"webpack": "^5.67.0",
8686
"webpack-bundle-analyzer": "^4.3.0",
8787
"webpack-dev-server": "^4.7.2"
8888
}

yarn.lock

+9-9
Original file line numberDiff line numberDiff line change
@@ -11075,15 +11075,15 @@ webpack-merge@^5.7.3:
1107511075
clone-deep "^4.0.1"
1107611076
wildcard "^2.0.0"
1107711077

11078-
webpack-sources@^3.2.2:
11079-
version "3.2.2"
11080-
resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.2.tgz#d88e3741833efec57c4c789b6010db9977545260"
11081-
integrity sha512-cp5qdmHnu5T8wRg2G3vZZHoJPN14aqQ89SyQ11NpGH5zEMDCclt49rzo+MaRazk7/UeILhAI+/sEtcM+7Fr0nw==
11078+
webpack-sources@^3.2.3:
11079+
version "3.2.3"
11080+
resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde"
11081+
integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==
1108211082

11083-
webpack@^5.56.0:
11084-
version "5.66.0"
11085-
resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.66.0.tgz#789bf36287f407fc92b3e2d6f978ddff1bfc2dbb"
11086-
integrity sha512-NJNtGT7IKpGzdW7Iwpn/09OXz9inIkeIQ/ibY6B+MdV1x6+uReqz/5z1L89ezWnpPDWpXF0TY5PCYKQdWVn8Vg==
11083+
webpack@^5.67.0:
11084+
version "5.67.0"
11085+
resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.67.0.tgz#cb43ca2aad5f7cc81c4cd36b626e6b819805dbfd"
11086+
integrity sha512-LjFbfMh89xBDpUMgA1W9Ur6Rn/gnr2Cq1jjHFPo4v6a79/ypznSYbAyPgGhwsxBtMIaEmDD1oJoA7BEYw/Fbrw==
1108711087
dependencies:
1108811088
"@types/eslint-scope" "^3.7.0"
1108911089
"@types/estree" "^0.0.50"
@@ -11108,7 +11108,7 @@ webpack@^5.56.0:
1110811108
tapable "^2.1.1"
1110911109
terser-webpack-plugin "^5.1.3"
1111011110
watchpack "^2.3.1"
11111-
webpack-sources "^3.2.2"
11111+
webpack-sources "^3.2.3"
1111211112

1111311113
websocket-driver@>=0.5.1, websocket-driver@^0.7.4:
1111411114
version "0.7.4"

0 commit comments

Comments
 (0)