Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
Skip to content
World desk4 min

Safari Runs a Module Worker’s Entry File Twice If Anything Imports It

A reported WebKit bug makes Safari evaluate a module worker's entry script a second time when its graph imports the entry URL, duplicating singletons and side effects.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If a module worker’s dependency graph imports the worker’s own entry URL, Safari can evaluate that entry script a second time and create a second module instance. That is what WebKit Bugzilla issue 324459 reports for Safari 26.5 on macOS 26.5.1. The issue was filed on September 17, 2026, is marked NEW, and has no resolution in the accessible record. It is one reporter’s account, and Safari 27 is not confirmed as fixed or affected.

What the bug report says

A page starts a worker with new Worker(url, { type: "module" }). Something in the worker’s graph then imports the worker’s entry URL. The reporter says this can happen three ways:

As an Amazon Associate I earn from qualifying purchases.

  • a static import cycle back to the entry,
  • a dynamic import() of the entry,
  • a code-split lazy chunk that imports from the worker entry.

In the minimal reproduction, the expected result is {"evals":1,"same":true}. The reported Safari result is {"evals":2,"same":false}. The entry body ran twice, and the namespace you get from the import is not the one the running worker already has. The report cites Chrome 153 and Firefox 156 as returning the existing module. Those are the reporter’s tested versions, not a guarantee for any other release.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The report names Safari 26.5 on macOS 26.5.1. It also says another developer hit the problem in Safari 26.3.

What is not affected, according to the reporter

  • The same import pattern in a document, rather than a worker, behaves correctly in Safari.
  • A worker entry and a chunk that both import a separate shared module are not affected.
  • Importing the entry by absolute URL, or by dynamic import, is described as affected like the relative static case.

Treat this as what one person observed, not a full compatibility matrix.

Why it violates the expected behavior

The WHATWG HTML Standard (a living document; the page read for this article was last updated 2026-10-04) says: “the module map is used to ensure that imported module scripts are only fetched, parsed, and evaluated once per Document or worker”. The same module URL should therefore evaluate once.

The reporter’s explanation is that Safari behaves as if the worker’s top-level script is missing from that module map. That is a diagnosis of the observed behavior, not a root cause confirmed by WebKit. The map is keyed by URL, so genuinely different URLs, such as a cache-busted entry.js?v=2, are not necessarily the same module. Only the same URL should be deduplicated.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Why it matters in real builds

The reporter’s production case was a lazily loaded ProRes decoder that registered itself in a module registry. The code that checked the registry was looking at a different copy. The reporter attributes this to a Vite 6.4 / Rollup 4 build in which a lazy chunk imported the worker’s entry chunk.

Rank #3
(Old Version) H&R Block Tax Software Deluxe + State 2024 with Refund Bonus Offer (Amazon Exclusive) Win/Mac [PC/Mac Online Code]
  • Choose to put your refund on an Amazon gift card and you can get a 2% bonus. See below for details
  • Quickly import your W-2, 1099, 1098, and last year's personal tax return, even from TurboTax and Quicken Software
  • One state program download included— a $39.95 value
  • Reporting assistance on income from investments, stock options, home sales, and retirement
  • Guidance on maximizing mortgage interest and real estate tax deductions (Schedule A)

A second evaluation can silently duplicate anything held at module scope:

  • registries and caches,
  • singletons and initialization flags,
  • WebAssembly instances,
  • top-level side effects such as message handlers.

This is one concrete report. It does not show that all Vite or Rollup builds, or all Safari apps, are affected.

Rank #4
(Old Version) H&R Block Tax Software Premium 2024 Win/Mac with Refund Bonus Offer (Amazon Exclusive) [PC/Mac Online Code]
  • Choose to put your refund on an Amazon gift card and you can get a 2% bonus. See below for details
  • Quickly import your W-2, 1099, 1098, and last year's personal tax return, even from TurboTax and Quicken Software
  • One state program download included— a $39.95 value
  • Tax calculators to help determine the cost basis of sale, dividend, gift, and inheritance assets
  • Advanced Schedule C guidance to maximize deductions for self-employment income
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

How to check your own project

  1. Build the project and open the emitted worker entry file and its chunks.
  2. Search the output for imports that reference the worker entry’s filename, as the reporter suggests. Any lazy or shared chunk importing the entry is the risky shape.
  3. Reproduce the generated graph in Safari. Serve it over local HTTP, because the supplied reproduction needs it: module workers do not load from a file:// address.
  4. Add a temporary counter or log at the top of the entry and check whether it fires twice, or compare the namespace identity of the imported entry with the running one.
  5. Run the same test in Chrome and Firefox to confirm the behavior is Safari-specific.

Workarounds that follow from the report

The report does not give an official fix, so these are inferences from its stated boundaries, not tested recommendations. The only boundary it states is that a worker entry and chunk both importing a separate shared module is not affected. So the safest approach is to keep stateful code out of the entry file. Put registries, caches and singletons in a separate shared module, and have both the entry and any lazy chunks import that module. Avoid chunk layouts where a lazy chunk imports back from the entry.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Safari 27 status

A WebKit contributor, Alexey Proskuryakov, replied on September 17, 2026: “Thank you for the report! Could you please try Safari 27?” WebKit’s September 2, 2026 post says Safari 27 adds top-level-await spec compliance through a ground-up module-loader rewrite. That post does not claim bug 324459 is fixed, and the accessible issue record has no result from the Safari 27 test. Until that is reported, test your own build on Safari 27 before assuming either way.

Limits of the evidence

The main source is an open issue and the reporter’s account. The Chrome and Firefox results are the reporter’s. Version numbers and the {"evals":2,"same":false} output come from a single reproduction, not a survey of how many sites are affected.

Quick Recap

Bestseller No. 3
(Old Version) H&R Block Tax Software Deluxe + State 2024 with Refund Bonus Offer (Amazon Exclusive) Win/Mac [PC/Mac Online Code]
(Old Version) H&R Block Tax Software Deluxe + State 2024 with Refund Bonus Offer (Amazon Exclusive) Win/Mac [PC/Mac Online Code]
One state program download included— a $39.95 value; Reporting assistance on income from investments, stock options, home sales, and retirement
$59.99
Bestseller No. 4
(Old Version) H&R Block Tax Software Premium 2024 Win/Mac with Refund Bonus Offer (Amazon Exclusive) [PC/Mac Online Code]
(Old Version) H&R Block Tax Software Premium 2024 Win/Mac with Refund Bonus Offer (Amazon Exclusive) [PC/Mac Online Code]
One state program download included— a $39.95 value; Advanced Schedule C guidance to maximize deductions for self-employment income
$84.99

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.