qwik icon indicating copy to clipboard operation
qwik copied to clipboard

"build.target = es2015" show "uncaught SyntaxError: Unexpected token 'export' (at service-worker.js:1:2509)"

Open lzxb opened this issue 2 years ago • 3 comments

Qwik Version

0.10.0

Operating System (or Browser)

Mac os chrome 104.0.5112.79 (arm64)

Node Version (if applicable)

v16.13.2

Which component is affected?

Qwik City

Expected Behaviour

No error reporting

Actual Behaviour

Uncaught SyntaxError: Unexpected token 'export' (at service-worker.js:1:2509)__

image

Additional Information

git clone [email protected]:lzxb/qwik-demo.git
git checkout bugfix-service-worker
yarn
yarn preview

lzxb avatar Oct 09 '22 02:10 lzxb

Hi @lzxb Just cloned your example repo mentioned above to give it a spin but didn't get the error. Do you still have it?

zanettin avatar Oct 29 '22 12:10 zanettin

image It still exists

lzxb avatar Oct 31 '22 01:10 lzxb

Thanks for your reply 🙏 Checked it again and i also have the error even on latest (0.12.1) when running the app using yarn preview. When i build it and run it then yarn build && yarn start, the SW seems to be perfect. Hope that helps for anybody to take over this task 🙏

zanettin avatar Nov 01 '22 21:11 zanettin

Should be fixed!

manucorporat avatar Feb 23 '23 07:02 manucorporat