[🐞] module import issue in generated service worker
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
- Domain
- build-system, web-dev
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
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
Starts the project's dev container in your browser, under your own GitHub account.
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from QwikDev/qwik
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
docs router V2
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
DX enhancement V2
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
QwikDev/qwik#8480 · 2 comments ·
Maintainers usually reply within 1 day
-
[🐞] Production build hoists a nested `.map()` handler's captures out of both loops, so SSR failsOpen
Difficulty 4/5 3-5 days Newbie friendliness 25/100
QwikDev/qwik#9190 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 22/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 1/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
core
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
vectorize-io/hindsight#5457 ·
Maintainers usually reply within 1 day
-
beginner friendly community contributions-welcome good first issue hacktoberfest help wanted testing up-for-grabs
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
lukilabs/beautiful-mermaid#160 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
rescript-lang/rescript-lang.org#1420 ·
Maintainers usually reply within 2 days