#webpack 7 articles
- For license information please see … leads to a 404 — the publish step left the bundle's .LICENSE.txt behindgotchas / toolingwebpack moves third-party license comments into .js.LICENSE.txt and leaves only a pointer in the bundle; a publish step that copies *.js, or an allowlist .gitignore, ships the code without the texts MIT and BSD…
- A library component loaded from your own manifest fetches its lazy chunks from that manifest's foldergotchas / spfxSPComponentLoader.loadComponent + a relocated manifest: without the chunk.* files next to the bundle every import() 404s on first use, which an open-the-app smoke test never exercises
- A module-level cached dynamic import() caches the rejection toogotchas / spfxOne chunk-load blip poisons the module-level promise for the whole session; reset it to null in .catch so the next call retries
- A shared package's dynamic import() ships inlined (not lazy-chunked) under module:commonjsgotchas / spfxA linked TS package built with module:commonjs turns import() into require(), so webpack can't lazy-chunk the lib into a separate file; set the package's module:esnext
- An SPFx chunk's file name is not its content — realContentHash is offgotchas / spfxSPFx builds with realContentHash: false, so a byte-identical chunk can get a new name (measured) and nothing rules out the reverse; deduplicate by bytes or git blob and never overwrite a published file
- Importing third-party CSS with url(images/...) breaks the SPFx buildgotchas / spfxurl(images/...) without ./ kills the build; inject a instead
- Load an SPFx bundle's lazy chunk from the browser console — no clicking through the UIgotchas / spfxPush a fake chunk with a runtime callback into the bundle's webpackJsonp_ array to get its real __webpack_require__, then req.e(chunkId) loads the chunk exactly as the app would — for checking 404s, SRI integrity or…