fix(build): preserve commented Vite URL imports

This commit is contained in:
4gray committed 2026-08-08 02:41:38 +02:00
1 parent 9c92a616a8
commit bccbe8dcba
7 files changed
+71 -42

No files matched your search

+10 -8
View File
@@ -60,20 +60,22 @@ server can then fail a lazy chunk request with `Maximum call stack size
exceeded`, even though static builds succeed because they do not pass emitted
chunks through Vite's request-time plugin container.
`patches/vite@7.3.5.patch` backports Vite's upstream precise-filter fix from
[vitejs/vite#21800](https://github.com/vitejs/vite/pull/21800). Keep the patch
while the supported Angular toolchain resolves Vite `7.3.5`; remove it only
after the resolved Vite contains the upstream fix. Run the regression check
after any related manifest or lockfile update:
`patches/vite@7.3.5.patch` backports Vite's upstream precise-matcher fix from
[vitejs/vite#21800](https://github.com/vitejs/vite/pull/21800). Bounded
prefilters keep the request-time scan linear while allowing comment-bearing
asset and worker expressions to reach the precise matcher after Vite strips
comments. Keep the patch while the supported Angular toolchain resolves Vite
`7.3.5`; remove it only after the resolved Vite contains the upstream fix. Run
the regression check after any related manifest or lockfile update:
```bash
pnpm run deps:vite:test
```
CI runs the same check. It resolves Vite from `@angular/build`, verifies the
patched filter wiring and version pin, stress-tests the false-positive chunk
shape, and preserves valid asset and worker `new URL(..., import.meta.url)`
matches.
patched prefilter/matcher wiring and version pin, stress-tests the false-positive
chunk shape, and preserves ordinary and comment-bearing asset and worker
`new URL(..., import.meta.url)` matches.
## Placement Decision