[turbopack] Fix CSS HMR on Safari (#92123)
Fixes #91818 **Regression source:** Commit `b7e4c6a0` ("Turbopack: transpile CHUNK_SUFFIX") introduced `getChunkSuffixFromScriptSrc()` which reads query strings from `<script>` tags. On Safari, this picks up the `?ts=` param injected by the server-side cache-busting workaround in `render.tsx` (for [WebKit #187726](https://bugs.webkit.org/show_bug.cgi?id=187726)), baking it into `ASSET_SUFFIX`. This causes HMR CSS URLs to match the preloaded URL exactly, re-triggering the Safari preload cache bug and preventing style updates. **Changes:** - **`dev-backend-dom.ts`**: Match existing `<link>` elements by base path (strip query string) so selectors work across HMR updates with different `?ts=` values. Add Safari to the Firefox cache-busting branch so new stylesheet links always get a fresh `?ts=`. - **`hmr-client.ts`**: Fix `mergeChunkUpdates` so a `total` update always supersedes any prior update type.
Showing
This source diff could not be displayed because it is too large.
You can
view the blob
instead.
This source diff could not be displayed because it is too large.
You can
view the blob
instead.
This diff is collapsed.
This source diff could not be displayed because it is too large.
You can
view the blob
instead.
This source diff could not be displayed because it is too large.
You can
view the blob
instead.
This source diff could not be displayed because it is too large.
You can
view the blob
instead.
This source diff could not be displayed because it is too large.
You can
view the blob
instead.
Please
register
or
sign in
to comment