Repository navigation
Commit 7681723
authored
docs: match the splash script tag to what webpack emits (#8392)
* docs: match the splash script tag to what webpack emits
The page showed <script type="module" src> going in and a classic <script
src> coming out, captioned as a URL rewrite, so it read as though webpack had
dropped the module type. It had not: without output.module the emitted chunk
is a classic IIFE, and webpack matches the tag to it - with output.module set
it keeps type="module" and emits an ES module chunk.
Showing a classic tag makes the before and after differ only in the URL, which
is what the caption claims. The emitted page is unchanged, same content hash.
* docs: keep the splash page on ES modules end to end
Rather than downgrading the page's script tag to match a classic bundle,
turn the config into one that emits ES modules, so type="module" survives
the build. Restores the module tag on the input and adds output.module with
a line saying why it is there.
Verified: with this config webpack emits [javascript module] chunks and the
page keeps <script type=module src=...>. The [contenthash].js template is
unchanged - output.module does not force an extension.
* docs: drop the removed outputModule experiment from the splash config
experiments.outputModule is gone in 5.111.0 - output.module carries ESM
output on its own now, per #8360. It appears nowhere in webpack's lib/ or
schemas/ any more, and the 'only allowed when experiments.outputModule is
enabled' check is gone with it. 5.111.0 is unreleased, so this is read from
source rather than run; the installed 5.110.3 still enforces the old rule.1 parent 59edbde commit 7681723
2 files changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
0 commit comments