Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[🐞] module import issue in generated service worker

Open
#8,075 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
typescript

Research direction

Start with the linked reproduction and inspect the generated service-worker.js output and the Qwik bundler path that produces it. Reproduce the import error with Qwik 1.17.0, then verify that the imported module is inlined in the generated service worker and the browser no longer reports an import syntax error.

Written by the indexing model from the issue text.

Description

enhancement PR welcomed router V2
Which component is affected?

Qwik City (routing)

Describe the bug

a module import issue:

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

import{openDB as t}from"./index3.js";self.addEventListener("install",()=>self.skipWaiting());self.addEventListener("activate",e=>{e.waitUntil(t("test",1).then(()=>console.log("DB opened")))});

we need to fix qwik bundler to inline imported module

Reproduction

https://github.com/makinghappen/qwik-sw-test

Steps to reproduce

No response

System Info
qwik 1.17.0
Additional Information

No response

Dominant language
TypeScript
Stars
22.1k
Forks
1.4k
Avg merge
1d 17h
Merged PRs (30d)
98

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from QwikDev/qwik

All issues in QwikDev/qwik

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.