You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Short option(s): either a single option with an attached value
727
-
// (`-d<value>`) or combined boolean flags (`-abc` => `-a -b -c`). Since
728
-
// we can't tell which without the option definitions, register every
729
-
// letter; over-registering an unused option is harmless.
722
+
// Register every letter of a short token to cover both attached values (`-d<value>`) and combined flags (`-abc`); over-registering is harmless.
730
723
for(constcharoftoken.slice(1).split("=",1)[0]){
731
724
names.add(char);
732
725
}
@@ -1009,12 +1002,7 @@ class WebpackCLI {
1009
1002
return(errorasError).name==="ValidationError";
1010
1003
}
1011
1004
1012
-
// Building arguments from the webpack/dev-server schema walks a large JSON
1013
-
// schema and is repeated within a single run (e.g. once per command and again
1014
-
// in `loadConfig`). Cache the result per webpack module and schema. The values
1015
-
// are large (~1MB each) and only needed while setting up a command, so they are
1016
-
// held via `WeakRef` to let the GC reclaim them afterwards (important for
1017
-
// long-running `serve`/`watch`); a miss simply rebuilds them.
1005
+
// Cache the expensive schema-to-arguments walk per webpack module and schema, held via `WeakRef` so the GC can reclaim the ~1MB result after command setup (a miss simply rebuilds it).
// Finds the highest-priority default configuration file (used when no
2300
-
// `--config` is passed). Reads each candidate directory once and matches
2301
-
// in-memory instead of probing every `<name><ext>` combination with a
2302
-
// separate `fs.access` call (up to ~100 sequential syscalls when no config
2303
-
// exists). Entries are lowercased so the membership check is case-insensitive;
2304
-
// the actual existence is confirmed with `access`, which keeps exact
2305
-
// filesystem semantics (case-sensitive or not). When a directory can't be
2306
-
// listed (e.g. execute-only permissions), every candidate is probed directly.
2287
+
// Finds the highest-priority default config file by reading each candidate directory once (case-insensitively) and confirming with `access`, instead of probing every `<name><ext>` combination separately.
0 commit comments