Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

I'm following the guide Session management with service workers. Currently I'm getting the error

Cannot use import statement outside a module (at service-worker.js:1:1)

I suspect it's related to this note in the guide

Make sure that the service worker is bundled so that it will still work after the browser has been closed.

Can anyone guide me on how to bundle a service worker using Next.js? This feels like a significant step that is glossed over, and I'm quite lost.

Thanks!

You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
🙏
Q&A
Labels
None yet
1 participant
Morty Proxy This is a proxified and sanitized view of the page, visit original site.