Skip to content

[Personal-WP] Port Safari fixes from website package#3221

Merged
adamziel merged 1 commit intotrunkfrom
personal-wp/safari-import-retry
Jan 30, 2026
Merged

[Personal-WP] Port Safari fixes from website package#3221
adamziel merged 1 commit intotrunkfrom
personal-wp/safari-import-retry

Conversation

@akirk
Copy link
Copy Markdown
Member

@akirk akirk commented Jan 30, 2026

Motivation for the change, related issues

Porting recent Safari-related fixes from the website package to personal-wp.

The following PRs were analyzed for porting:

PR Description Status for personal-wp
#3200 Strip Range headers in Safari (offline-mode-cache.ts) Already covered - personal-wp uses the remote package
#3208 Use no-store instead of no-cache (offline-mode-cache.ts) Already covered - personal-wp uses the remote package
#3212 Replace .blob() with .arrayBuffer() Already covered - changes are in shared packages (blueprints, wordpress-builds, php-wasm/web-service-worker, remote)
#3216 Retry import() when it fails in Safari Ported in this PR

Only #3216 required porting since it modifies index.html which is specific to each package.

Implementation details

When the initial import('./src/main') fails, the code retries by:

  1. Extracting the built module URL from a stringified import function
  2. Adding a cache-busting _ts query parameter with the current timestamp
  3. Attempting the import again with the cache-busted URL

This is the same approach used in the website package.

Testing Instructions (or ideally a Blueprint)

  1. Open personal-wp in Safari on iOS
  2. Connect to a Mac via cable
  3. Open devtools for that tab in Desktop Safari
  4. Deploy this PR
  5. Refresh the tab on iOS
  6. Confirm the website reloads correctly
  7. If you see "Failed to load main module" in the console followed by a successful retry, the fix is working

Port the Safari import retry fix from the website package (#3216) to personal-wp.
@adamziel adamziel merged commit 12b2e54 into trunk Jan 30, 2026
35 checks passed
@adamziel adamziel deleted the personal-wp/safari-import-retry branch January 30, 2026 09:32
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.

2 participants