sveltejs / kit

web development, streamlined
https://svelte.dev/docs/kit
MIT License
18.78k stars 1.96k forks source link

adapter-static generates unused js chunks when csr=false #9703

Open sparrowsl opened 1 year ago

sparrowsl commented 1 year ago

Describe the bug

Even when csr=false I still get the js bundle chunks in the final build. If I delete the files, the site will still work, but it is annoying if I have to delete the files everytime before I send the final build to someone.

Reproduction

Logs

No response

System Info

@sveltejs/kit@1.15.7
@sveltejs/adapter-static@2.0.0

Severity

annoyance

Additional Information

No response

doongjohn commented 1 month ago

Is there any update on this issue?

sparrowsl commented 1 month ago

just tested it on:

{
  "@sveltejs/adapter-static": "3.0.6"
  "@sveltejs/kit": "2.7.3"
  "@sveltejs/vite-plugin-svelte": "4.0.0",
  "svelte": "5.1.9",
  "vite": "5.4.10"
}

and it's still the same with

export const csr = false;
export const prerender = true;