wmr
wmr copied to clipboard
v3.5.0 fails building WorkBox v6.2.4
Describe the bug Building fails with latest Workbox Core
> wmr build --prerender
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
Why you should do it regularly:
https://github.com/browserslist/browserslist#browsers-data-updating
Error: Unexpected token (npm/[email protected]/_private/assert.js:72:32)
at sb (/home/abel/Projects/PWA/node_modules/wmr/wmr.cjs:2:965070)
at Object.transform (/home/abel/Projects/PWA/node_modules/wmr/wmr.cjs:2:2539015)
at /home/abel/Projects/PWA/node_modules/wmr/wmr.cjs:2:337452
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
To Reproduce Just try to build a project that uses workbox 6.2.4
Expected behavior Succesufl compiling
Bug occurs with:
- [ ]
wmrorwmr start(development) - [x]
wmr build(production) - [ ]
wmr serve
Desktop (please complete the following information):
- OS: Ubuntu 20.04
- Browser: Chrome
- Node Version: 14.17.5
- WMR Version: 3.5.0
- WMR service-workers plugin: 0.3.0
Additional context Add any other context about the problem here.
Funky. The relevant line:
export { finalAssertExports as assert };
Could be an issue with our acorn plugin for import assertions.
This issue looks related to https://github.com/preactjs/wmr/issues/769
Is there a minimal reproducible example we can leverage to fix this issue? 😅