sveltejs / sapper

The next small thing in web development, powered by Svelte
https://sapper.svelte.dev
MIT License
7k stars 434 forks source link

unexpected token export in generated client.js after upgrading to 0.29.0 #1705

Closed danphil closed 3 years ago

danphil commented 3 years ago

Describe the bug Upon upgrading to 0.29.0, a previously working dynamic app results in "Unexpected token: export..." in Chrome-stable-latest and "export must be at the top..." in FF-stable-latest in the sapper generated client.js chunk. First page renders correctly but has no functionality.

Logs Uncaught SyntaxError: export declarations may only appear at top level of a module client.33c71ccb.js:2224

To Reproduce 1) Clone sapper-template 2) Upgrade sapper to 0.29.0 in package.json 3) npm install, npm run dev 4) Open localhost:3000

Expected behavior Upgrade, change rel=prefetch to sapper:prefetch, ???, profit

Information about your Sapper Installation:

Severity Blocking upgrade.