Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v3.5.0 fails building WorkBox v6.2.4 #795

Open
1 of 3 tasks
AbelVM opened this issue Aug 18, 2021 · 4 comments
Open
1 of 3 tasks

v3.5.0 fails building WorkBox v6.2.4 #795

AbelVM opened this issue Aug 18, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@AbelVM
Copy link

AbelVM commented Aug 18, 2021

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/workbox-core@6.2.4/_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)
  • 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 AbelVM added the bug Something isn't working label Aug 18, 2021
@developit
Copy link
Member

Funky. The relevant line:

export { finalAssertExports as assert };

@marvinhagemeister
Copy link
Member

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

@AbelVM
Copy link
Author

AbelVM commented Aug 19, 2021

This issue looks related to #769

@JoviDeCroock
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants