Service Worker JavaScript (ES) Modules Issue Tester
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode
docs
.gitignore
LICENSE
README.md
package.json

README.md

SWESMIT

Service Worker JavaScript (ES) Modules Issue Tester

Using the Cache API to add one or more JavaScript Modules (aka ES / ECMAScript Modules) in a Service Worker throws errors in Google Chrome, or worse, crashes the browser. That's sad, because:

  • Service Workers are a key component for writing Progressive Web Apps, and other offline-first ready applications, and
  • native JavaScript modules are becoming an essential tool for writing better, lighter, and easier to maintain JavaScript code, especially now when they are supported by most popular browsers.

SWESMIT is a simple and straighforward web app created to test this issue.

In Chrome on Android In Chrome on Windows
SWESMIT Chrome Android Screenshot SWESMIT Chrome Windows Screenshot

Issue Tracking

The main issue on the chromium issue tracking tool:
832202 - javascript modules not working with cache-api - chromium - Monorail

and other related, duplicate or merged issues:
833501 - CacheStorage API interaction with ES module (using export) results in runtime error - chromium - Monorail
810469 - Caching a JS file with an export result in an error (possibly other JS syntaxes) - chromium - Monorail
Precaching modules throws error to console · Issue #1433 · GoogleChrome/workbox
Module Exports in Workbox Failing to Precache · Issue #1286 · GoogleChrome/workbox
Uncaught (in promise) SyntaxError: Unexpected token export at Object · Issue #54 · ionic-team/ionic-pwa-toolkit

Contributions

Contributions are welcome! For feature requests and bug reports please submit an issue.

Sponsor

SWESMIT (and all HWALab free apps) are supported by East-Tec, the home of east-tec Eraser, the privacy tool that quickly and securely covers your online and PC tracks.

License

SWESMIT is licensed under the MIT License.