Skip to content

[🐞] module import issue in generated service worker #8075

@makinghappen

Description

@makinghappen

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions