Patch Changes
-
Fix full-page HMR reloads in WebKit rendering stale JavaScript when a module had been preloaded. With HMR enabled, the asset server now sends
Vary: *on compiled JavaScript responses to WebKit so the browser always requests current modules. This can add a request for a preloaded dependency, and because the Cache API rejects responses withVary: *, a service worker can't cache these development scripts in WebKit. (#12392) -
Account for injected HMR setup code in source maps for modules that use
import.meta.hot. (#12402) -
Improve compilation throughput, warm response latency, and memory usage across scripts, styles, and cached file transforms. Cold
getScriptEntry()andgetPreloads()calls now compute the optimized module graph once and resolve/emit dependencies concurrently, warmgetScriptEntry()calls avoidstructuredClone, watch mode no longer clears theoxc-resolvercache on every module with a bare import, and active browser HMR channels no longer spawn a secondchokidarwatcher. (#12469)Reduce memory retention by releasing intermediate transform state after emit when
watchisfalse, bounding emitted script and style caches with an LRU byte limit, skipping duplicate.mapassets whensourceMapsis'inline', and avoiding redundant body hashing oncreateFsFileCache()hits. Asset responses now includeContent-Lengthon200andHEADresponses andCache-Controlon304responses. -
Fix asset source maps attributing explicitly unmapped generated code to preceding authored source locations after loader transforms or minification. (#12397)
-
Bumped
@remix-run/*dependencies: