Skip to content

Commit c727c4f

Browse files
authoredJan 19, 2024
fix: correct the minimum help output (#4057)
1 parent aed6220 commit c727c4f

File tree

4 files changed

+15
-26
lines changed

4 files changed

+15
-26
lines changed
 

‎OPTIONS.md

+14-1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ Options:
4747
--cache-name <value> Name for the cache. Different names will lead to different coexisting caches.
4848
--cache-profile Track and log detailed timing information for individual cache items.
4949
--no-cache-profile Negative 'cache-profile' option.
50+
--cache-readonly Enable/disable readonly mode.
51+
--no-cache-readonly Negative 'cache-readonly' option.
5052
--cache-store <value> When to store data to the filesystem. (pack: Store data when compiler is idle in a single file).
5153
--cache-version <value> 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.
5254
--context <value> 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:
98100
--no-experiments-sync-web-assembly Negative 'experiments-sync-web-assembly' option.
99101
--experiments-top-level-await Allow using top-level-await in EcmaScript Modules.
100102
--no-experiments-top-level-await Negative 'experiments-top-level-await' option.
101-
--extends <value...> Path to the configuration to be extended (only works when using webpack-cli).
102103
--extends-reset Clear all items provided in 'extends' configuration. Extend configuration from another configuration (only works when using webpack-cli).
103104
--externals <value...> Every matched dependency becomes external. An exact matched dependency becomes external. The same string is used as external dependency.
104105
--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:
168169
--no-module-parser-javascript-commonjs-magic-comments Negative 'module-parser-javascript-commonjs-magic-comments' option.
169170
--module-parser-javascript-create-require [value] Enable/disable parsing "import { createRequire } from "module"" and evaluating createRequire().
170171
--no-module-parser-javascript-create-require Negative 'module-parser-javascript-create-require' option.
172+
--module-parser-javascript-dynamic-import-fetch-priority <value> Specifies global fetchPriority for dynamic import.
173+
--no-module-parser-javascript-dynamic-import-fetch-priority Negative 'module-parser-javascript-dynamic-import-fetch-priority' option.
171174
--module-parser-javascript-dynamic-import-mode <value> Specifies global mode for dynamic import.
172175
--module-parser-javascript-dynamic-import-prefetch [value] Specifies global prefetch for dynamic import.
173176
--no-module-parser-javascript-dynamic-import-prefetch Negative 'module-parser-javascript-dynamic-import-prefetch' option.
@@ -241,6 +244,8 @@ Options:
241244
--no-module-parser-javascript-auto-commonjs-magic-comments Negative 'module-parser-javascript-auto-commonjs-magic-comments' option.
242245
--module-parser-javascript-auto-create-require [value] Enable/disable parsing "import { createRequire } from "module"" and evaluating createRequire().
243246
--no-module-parser-javascript-auto-create-require Negative 'module-parser-javascript-auto-create-require' option.
247+
--module-parser-javascript-auto-dynamic-import-fetch-priority <value> Specifies global fetchPriority for dynamic import.
248+
--no-module-parser-javascript-auto-dynamic-import-fetch-priority Negative 'module-parser-javascript-auto-dynamic-import-fetch-priority' option.
244249
--module-parser-javascript-auto-dynamic-import-mode <value> Specifies global mode for dynamic import.
245250
--module-parser-javascript-auto-dynamic-import-prefetch [value] Specifies global prefetch for dynamic import.
246251
--no-module-parser-javascript-auto-dynamic-import-prefetch Negative 'module-parser-javascript-auto-dynamic-import-prefetch' option.
@@ -314,6 +319,8 @@ Options:
314319
--no-module-parser-javascript-dynamic-commonjs-magic-comments Negative 'module-parser-javascript-dynamic-commonjs-magic-comments' option.
315320
--module-parser-javascript-dynamic-create-require [value] Enable/disable parsing "import { createRequire } from "module"" and evaluating createRequire().
316321
--no-module-parser-javascript-dynamic-create-require Negative 'module-parser-javascript-dynamic-create-require' option.
322+
--module-parser-javascript-dynamic-dynamic-import-fetch-priority <value> Specifies global fetchPriority for dynamic import.
323+
--no-module-parser-javascript-dynamic-dynamic-import-fetch-priority Negative 'module-parser-javascript-dynamic-dynamic-import-fetch-priority' option.
317324
--module-parser-javascript-dynamic-dynamic-import-mode <value> Specifies global mode for dynamic import.
318325
--module-parser-javascript-dynamic-dynamic-import-prefetch [value] Specifies global prefetch for dynamic import.
319326
--no-module-parser-javascript-dynamic-dynamic-import-prefetch Negative 'module-parser-javascript-dynamic-dynamic-import-prefetch' option.
@@ -387,6 +394,8 @@ Options:
387394
--no-module-parser-javascript-esm-commonjs-magic-comments Negative 'module-parser-javascript-esm-commonjs-magic-comments' option.
388395
--module-parser-javascript-esm-create-require [value] Enable/disable parsing "import { createRequire } from "module"" and evaluating createRequire().
389396
--no-module-parser-javascript-esm-create-require Negative 'module-parser-javascript-esm-create-require' option.
397+
--module-parser-javascript-esm-dynamic-import-fetch-priority <value> Specifies global fetchPriority for dynamic import.
398+
--no-module-parser-javascript-esm-dynamic-import-fetch-priority Negative 'module-parser-javascript-esm-dynamic-import-fetch-priority' option.
390399
--module-parser-javascript-esm-dynamic-import-mode <value> Specifies global mode for dynamic import.
391400
--module-parser-javascript-esm-dynamic-import-prefetch [value] Specifies global prefetch for dynamic import.
392401
--no-module-parser-javascript-esm-dynamic-import-prefetch Negative 'module-parser-javascript-esm-dynamic-import-prefetch' option.
@@ -626,8 +635,12 @@ Options:
626635
--no-output-environment-destructuring Negative 'output-environment-destructuring' option.
627636
--output-environment-dynamic-import The environment supports an async import() function to import EcmaScript modules.
628637
--no-output-environment-dynamic-import Negative 'output-environment-dynamic-import' option.
638+
--output-environment-dynamic-import-in-worker The environment supports an async import() is available when creating a worker.
639+
--no-output-environment-dynamic-import-in-worker Negative 'output-environment-dynamic-import-in-worker' option.
629640
--output-environment-for-of The environment supports 'for of' iteration ('for (const x of array) { ... }').
630641
--no-output-environment-for-of Negative 'output-environment-for-of' option.
642+
--output-environment-global-this The environment supports 'globalThis'.
643+
--no-output-environment-global-this Negative 'output-environment-global-this' option.
631644
--output-environment-module The environment supports EcmaScript Module syntax to import EcmaScript modules (import ... from '...').
632645
--no-output-environment-module Negative 'output-environment-module' option.
633646
--output-environment-optional-chaining The environment supports optional chaining ('obj?.a' or 'obj?.()').

‎SERVE-OPTIONS-v4.md

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ Options:
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-
--extends <value...> Path to the configuration to be extended (only works when using webpack-cli).
2221
--mode <value> Enable production optimizations or development hints.
2322
--name <value> Name of the configuration. Used when loading multiple configurations.
2423
-o, --output-path <value> The output directory as **absolute path** (required).

‎packages/webpack-cli/src/webpack-cli.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1052,6 +1052,7 @@ class WebpackCLI implements IWebpackCLI {
10521052
},
10531053
];
10541054

1055+
// Options from webpack core to be included in the minimum help output
10551056
const minimumHelpFlags = [
10561057
"mode",
10571058
"watch",
@@ -1062,7 +1063,6 @@ class WebpackCLI implements IWebpackCLI {
10621063
"target",
10631064
"name",
10641065
"output-path",
1065-
"extends",
10661066
];
10671067

10681068
// Extract all the flags being exported from core.

‎test/help/__snapshots__/help.test.js.snap.devServer4.webpack5

-23
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ Options:
108108
-d, --devtool <value> A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).
109109
--no-devtool Negative 'devtool' option.
110110
--entry <value...> A module that is loaded upon startup. Only the last one is exported.
111-
--extends <value...> Path to the configuration to be extended (only works when using webpack-cli).
112111
--mode <value> Enable production optimizations or development hints.
113112
--name <value> Name of the configuration. Used when loading multiple configurations.
114113
-o, --output-path <value> The output directory as **absolute path** (required).
@@ -169,7 +168,6 @@ Options:
169168
-d, --devtool <value> A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).
170169
--no-devtool Negative 'devtool' option.
171170
--entry <value...> A module that is loaded upon startup. Only the last one is exported.
172-
--extends <value...> Path to the configuration to be extended (only works when using webpack-cli).
173171
--mode <value> Enable production optimizations or development hints.
174172
--name <value> Name of the configuration. Used when loading multiple configurations.
175173
-o, --output-path <value> The output directory as **absolute path** (required).
@@ -230,7 +228,6 @@ Options:
230228
-d, --devtool <value> A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).
231229
--no-devtool Negative 'devtool' option.
232230
--entry <value...> A module that is loaded upon startup. Only the last one is exported.
233-
--extends <value...> Path to the configuration to be extended (only works when using webpack-cli).
234231
--mode <value> Enable production optimizations or development hints.
235232
--name <value> Name of the configuration. Used when loading multiple configurations.
236233
-o, --output-path <value> The output directory as **absolute path** (required).
@@ -290,7 +287,6 @@ Options:
290287
-d, --devtool <value> A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).
291288
--no-devtool Negative 'devtool' option.
292289
--entry <value...> A module that is loaded upon startup. Only the last one is exported.
293-
--extends <value...> Path to the configuration to be extended (only works when using webpack-cli).
294290
--mode <value> Enable production optimizations or development hints.
295291
--name <value> Name of the configuration. Used when loading multiple configurations.
296292
-o, --output-path <value> The output directory as **absolute path** (required).
@@ -338,7 +334,6 @@ Options:
338334
-d, --devtool <value> A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).
339335
--no-devtool Negative 'devtool' option.
340336
--entry <value...> A module that is loaded upon startup. Only the last one is exported.
341-
--extends <value...> Path to the configuration to be extended (only works when using webpack-cli).
342337
--mode <value> Enable production optimizations or development hints.
343338
--name <value> Name of the configuration. Used when loading multiple configurations.
344339
-o, --output-path <value> The output directory as **absolute path** (required).
@@ -402,8 +397,6 @@ Options:
402397
--no-devtool Negative 'devtool' option.
403398
--entry <value...> A module that is loaded upon startup.
404399
Only the last one is exported.
405-
--extends <value...> Path to the configuration to be extended
406-
(only works when using webpack-cli).
407400
--mode <value> Enable production optimizations or
408401
development hints.
409402
--name <value> Name of the configuration. Used when
@@ -476,8 +469,6 @@ Options:
476469
--no-devtool Negative 'devtool' option.
477470
--entry <value...> A module that is loaded upon startup.
478471
Only the last one is exported.
479-
--extends <value...> Path to the configuration to be extended
480-
(only works when using webpack-cli).
481472
--mode <value> Enable production optimizations or
482473
development hints.
483474
--name <value> Name of the configuration. Used when
@@ -534,7 +525,6 @@ Options:
534525
-d, --devtool <value> A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).
535526
--no-devtool Negative 'devtool' option.
536527
--entry <value...> A module that is loaded upon startup. Only the last one is exported.
537-
--extends <value...> Path to the configuration to be extended (only works when using webpack-cli).
538528
--mode <value> Enable production optimizations or development hints.
539529
--name <value> Name of the configuration. Used when loading multiple configurations.
540530
-o, --output-path <value> The output directory as **absolute path** (required).
@@ -582,7 +572,6 @@ Options:
582572
-d, --devtool <value> A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).
583573
--no-devtool Negative 'devtool' option.
584574
--entry <value...> A module that is loaded upon startup. Only the last one is exported.
585-
--extends <value...> Path to the configuration to be extended (only works when using webpack-cli).
586575
--mode <value> Enable production optimizations or development hints.
587576
--name <value> Name of the configuration. Used when loading multiple configurations.
588577
-o, --output-path <value> The output directory as **absolute path** (required).
@@ -1564,7 +1553,6 @@ Options:
15641553
-d, --devtool <value> A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).
15651554
--no-devtool Negative 'devtool' option.
15661555
--entry <value...> A module that is loaded upon startup. Only the last one is exported.
1567-
--extends <value...> Path to the configuration to be extended (only works when using webpack-cli).
15681556
--mode <value> Enable production optimizations or development hints.
15691557
--name <value> Name of the configuration. Used when loading multiple configurations.
15701558
-o, --output-path <value> The output directory as **absolute path** (required).
@@ -1610,7 +1598,6 @@ Options:
16101598
-d, --devtool <value> A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).
16111599
--no-devtool Negative 'devtool' option.
16121600
--entry <value...> A module that is loaded upon startup. Only the last one is exported.
1613-
--extends <value...> Path to the configuration to be extended (only works when using webpack-cli).
16141601
--mode <value> Enable production optimizations or development hints.
16151602
--name <value> Name of the configuration. Used when loading multiple configurations.
16161603
-o, --output-path <value> The output directory as **absolute path** (required).
@@ -1672,8 +1659,6 @@ Options:
16721659
--no-devtool Negative 'devtool' option.
16731660
--entry <value...> A module that is loaded upon startup.
16741661
Only the last one is exported.
1675-
--extends <value...> Path to the configuration to be extended
1676-
(only works when using webpack-cli).
16771662
--mode <value> Enable production optimizations or
16781663
development hints.
16791664
--name <value> Name of the configuration. Used when
@@ -1743,8 +1728,6 @@ Options:
17431728
--no-devtool Negative 'devtool' option.
17441729
--entry <value...> A module that is loaded upon startup.
17451730
Only the last one is exported.
1746-
--extends <value...> Path to the configuration to be extended
1747-
(only works when using webpack-cli).
17481731
--mode <value> Enable production optimizations or
17491732
development hints.
17501733
--name <value> Name of the configuration. Used when
@@ -1798,7 +1781,6 @@ Options:
17981781
-d, --devtool <value> A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).
17991782
--no-devtool Negative 'devtool' option.
18001783
--entry <value...> A module that is loaded upon startup. Only the last one is exported.
1801-
--extends <value...> Path to the configuration to be extended (only works when using webpack-cli).
18021784
--mode <value> Enable production optimizations or development hints.
18031785
--name <value> Name of the configuration. Used when loading multiple configurations.
18041786
-o, --output-path <value> The output directory as **absolute path** (required).
@@ -1844,7 +1826,6 @@ Options:
18441826
-d, --devtool <value> A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).
18451827
--no-devtool Negative 'devtool' option.
18461828
--entry <value...> A module that is loaded upon startup. Only the last one is exported.
1847-
--extends <value...> Path to the configuration to be extended (only works when using webpack-cli).
18481829
--mode <value> Enable production optimizations or development hints.
18491830
--name <value> Name of the configuration. Used when loading multiple configurations.
18501831
-o, --output-path <value> The output directory as **absolute path** (required).
@@ -1891,7 +1872,6 @@ Options:
18911872
-d, --devtool <value> A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).
18921873
--no-devtool Negative 'devtool' option.
18931874
--entry <value...> A module that is loaded upon startup. Only the last one is exported.
1894-
--extends <value...> Path to the configuration to be extended (only works when using webpack-cli).
18951875
--mode <value> Enable production optimizations or development hints.
18961876
--name <value> Name of the configuration. Used when loading multiple configurations.
18971877
-o, --output-path <value> The output directory as **absolute path** (required).
@@ -1952,7 +1932,6 @@ Options:
19521932
-d, --devtool <value> A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).
19531933
--no-devtool Negative 'devtool' option.
19541934
--entry <value...> A module that is loaded upon startup. Only the last one is exported.
1955-
--extends <value...> Path to the configuration to be extended (only works when using webpack-cli).
19561935
--mode <value> Enable production optimizations or development hints.
19571936
--name <value> Name of the configuration. Used when loading multiple configurations.
19581937
-o, --output-path <value> The output directory as **absolute path** (required).
@@ -2203,7 +2182,6 @@ Options:
22032182
-d, --devtool <value> A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).
22042183
--no-devtool Negative 'devtool' option.
22052184
--entry <value...> A module that is loaded upon startup. Only the last one is exported.
2206-
--extends <value...> Path to the configuration to be extended (only works when using webpack-cli).
22072185
--mode <value> Enable production optimizations or development hints.
22082186
--name <value> Name of the configuration. Used when loading multiple configurations.
22092187
-o, --output-path <value> The output directory as **absolute path** (required).
@@ -2262,7 +2240,6 @@ Options:
22622240
-d, --devtool <value> A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).
22632241
--no-devtool Negative 'devtool' option.
22642242
--entry <value...> A module that is loaded upon startup. Only the last one is exported.
2265-
--extends <value...> Path to the configuration to be extended (only works when using webpack-cli).
22662243
--mode <value> Enable production optimizations or development hints.
22672244
--name <value> Name of the configuration. Used when loading multiple configurations.
22682245
-o, --output-path <value> The output directory as **absolute path** (required).

0 commit comments

Comments
 (0)
Please sign in to comment.