Repository navigation
Commit 92c4650
authored
fix: report the missing module when a code generation dependency resolved to nothing (#21992)
* fix: generate code for a module whose codegen dependency has no module
A dependency registered with `addCodeGenerationDependency` that resolved to
nothing can never be code-generated, so the scheduler waited on it forever.
When every remaining job waited that way it reported a circular code
generation dependency instead, hiding the module-not-found error behind an
internal one.
An html page referencing a missing asset, and a stylesheet with a missing
`url()`, both hit this in production once concatenation left a single job.
Both now report what is actually missing and render the same `data:,`
placeholder development already rendered.
* test(test262): give the strict scenario's directive to the parser
The scenario prepended "use strict" to the assembled bundle, so webpack read
every strict-scenario file as sloppy code and accepted what only strict mode
rejects. A loader now puts the directive in the source webpack parses, on line
one so diagnostics keep pointing at the original lines.
That un-skips the case pinning the gap: `import('...', yield)` is a
SyntaxError only in strict mode, which webpack already reports once it reads
the file strictly.
* test(hmr): say why the shared module is disposed in this case
The case name and comment read as an unfixed defect, but dropping [runtime]
from output.hotUpdateMainFilename is exactly what the plugin warns about here:
the colliding manifests merge, so one runtime applies the other's removals.
Both now say that is what the case asserts.
* test(hmr): let the extracted-stylesheet cases fail
Both read a stylesheet under a name nothing emits, with every expectation
inside an empty catch, so the read threw and the case passed having asserted
nothing. They now read the file that is emitted and let the assertion through,
which is what pins the red -> blue -> green sequence a hot update applies.
The filters said the other runners run out of memory. They do not: the cases
pin target "web" themselves, so another runner rebuilds the same bundle.
* test(test262): insert the strict directive as INTERPRETING.md defines it
The transformation is specified as the directive, a semicolon and a newline as
the file's initial character sequence. Keeping it on line 1 preserved the
source's line numbers but is not what the document says, and it only stayed
safe because every hashbang case carries the raw flag.1 parent ee66ae8 commit 92c4650
21 files changed
Lines changed: 164 additions & 59 deletions
File tree
- .changeset
- lib
- test
- configCases
- css/missing-url
- __snapshots__
- html/missing-asset
- __snapshots__
- helpers
- hotCases
- css
- css-entry-mini-extract
- mini-css-extract
- disposing/runtime-independent-filename
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4223 | 4223 | | |
4224 | 4224 | | |
4225 | 4225 | | |
4226 | | - | |
4227 | | - | |
4228 | | - | |
4229 | | - | |
4230 | | - | |
4231 | | - | |
4232 | | - | |
4233 | | - | |
4234 | | - | |
| 4226 | + | |
| 4227 | + | |
| 4228 | + | |
| 4229 | + | |
| 4230 | + | |
| 4231 | + | |
| 4232 | + | |
| 4233 | + | |
| 4234 | + | |
| 4235 | + | |
| 4236 | + | |
4235 | 4237 | | |
4236 | 4238 | | |
4237 | 4239 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
0 commit comments