wmr icon indicating copy to clipboard operation
wmr copied to clipboard

v3.5.0 fails building WorkBox v6.2.4

Open AbelVM opened this issue 4 years ago • 4 comments

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:

  • [ ] wmr or wmr 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.

AbelVM avatar Aug 18 '21 15:08 AbelVM

Funky. The relevant line:

export { finalAssertExports as assert };

developit avatar Aug 18 '21 15:08 developit

Could be an issue with our acorn plugin for import assertions.

marvinhagemeister avatar Aug 18 '21 16:08 marvinhagemeister

This issue looks related to https://github.com/preactjs/wmr/issues/769

AbelVM avatar Aug 19 '21 08:08 AbelVM

Is there a minimal reproducible example we can leverage to fix this issue? 😅

JoviDeCroock avatar Sep 08 '21 22:09 JoviDeCroock