Skip to content

II. Technical Challenges (Why This Is Not "Just Add onerror")

DimensionChallenge
SemanticsMust satisfy: try initial URL first, circuit mainly constrains fallback hosts, unmatched resources must not change semantics (still giveup, but different from entering the fallback chain).
ViteRewriting dynamic import too early breaks __vitePreload/__vite__mapDeps and async component CSS; literal dynamic import replacement must happen after the bundle is finalized.
WebpackGlobal error and __webpack_require__.l injection can both see the same failure — without DOM markers, double retry; async CSS chunks (mini-css-extract, experiments.css, non-j loaders in __webpack_require__.f) reject promises — Observer replacing <link> alone leaves Promise.all short-circuited: JS fallback succeeds but lazy load still throws ChunkLoadError.
ESMFailed module record cache causes "looks like fallback but Network is flat"; same URL + query strategy must be consistent across all entry points.
Config vs realityWhen Vite base/publicPath and rule base diverge, opening the rewrite gate can rewrite async chunks to the wrong CDN — product and engineering misjudgment; needs a shouldRewriteUrls gate (compare after ensureTrailingSlash).
LegacySystemJS and Observer without mutually exclusive URL registrationdouble fallback or missed handling.

Previous: Engineering Highlights · Next: OSS Comparison