Skip to content

fix(asset): handle Safari URLs and restore CSS ID tokens - #117

Merged
atldays merged 1 commit into
mainfrom
hotfix/0.16.2
Nov 5, 2026
Merged

atldays merged 1 commit into
mainfrom
hotfix/0.16.2

Conversation

@atldays

@atldays atldays commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

Safari builds emit Chromium resource URLs for ?browser and ?chrome assets. Select safari-web-extension:// for Safari while preserving chrome-extension:// for Chromium targets and moz-extension:// for Firefox.

Replace the late, all-asset token rewrite with CssIdTokenPlugin. It restores the native extension ID token only in emitted CSS through processAssets and ReplaceSource, before source map extraction and final content hashing. Both plugins share CssExtensionIdToken from token.ts.

Validation:

  • Package build, TypeScript checks, and formatting pass.
  • 17 focused plugin/style-routing tests cover browser schemes, unchanged JS/binary assets, source map positions, final CSS content hashes, and watch updates.
  • Pre-push npm run check passes, including non-browser tests and fixture builds/typechecks.

Safari is verified at build-output level; Safari runtime testing remains outstanding.

@atldays
atldays merged commit a1fe097 into main Nov 5, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant