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
{{ message }}
Repository navigation
Commit e2988be
Browse filesBrowse the repository at this point in the historyBrowse files
fix(config): default output.module to true for module library types (#22071)
* fix(config): default output.module to true for module library types
A `module` or `modern-module` library type only exists as an ECMAScript
module, but since the `experiments.outputModule` removal nothing turned
`output.module` on for it — so `output.iife` stayed true and the emitted
`export` statement landed inside an IIFE, which no engine or minifier parses.
`output.module` now defaults to true wherever such a library type is
declared: `output.library`, `output.libraryTarget`, an entry's `library`,
and `output.enabledLibraryTypes` as `ModuleFederationPlugin` leaves it.
Disabling `output.module` by hand alongside one is rejected with the error
the experiment check used to raise.
* test(library): cover the module library types the harness reads
The test runner reads the config as written, so its ESM dispatch has to
mirror every place the default reads a module library type from —
`output.enabledLibraryTypes` was missing. The entry-level case now covers
`modern-module` next to `module`, and the changeset moves back out of the
pending `experiments.outputModule` entry into one of its own.
* fix(config): let a module library type enable output.module
A `module` or `modern-module` library type is another spelling of
`output.module` rather than something that can disagree with it, so it turns
module output on instead of being rejected next to `output.module: false`.
That drops the configuration error and leaves `lib/WebpackOptionsApply.js`
untouched.
0 commit comments