Skip to content

Extra unused files are output with bundleStrategy: 'single' #13551

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
danielcrabtree opened this issue Mar 6, 2025 · 1 comment
Open

Extra unused files are output with bundleStrategy: 'single' #13551

danielcrabtree opened this issue Mar 6, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@danielcrabtree
Copy link

Describe the bug

As per the comment by @ligazetom in #3882, extra unnecessary and unused files are included in the build output when using the new bundleStrategy: 'single'.

In my case, I have a default new project using adapter-static with SSR disabled and tailwind. The generated entry point html correctly only contains references to the js and css bundles.

However, there is also a _layout css bundle generated that is unused and should not exist.

In addition, there is a env.js file, that is not referenced from anywhere and so apparently should not exist either.

Reproduction

Set bundleStrategy: 'single'.

Logs

System Info

npmPackages:
    @sveltejs/adapter-static: ^3.0.8 => 3.0.8 
    @sveltejs/kit: ^2.16.0 => 2.18.0 
    @sveltejs/vite-plugin-svelte: ^5.0.0 => 5.0.3         
    svelte: ^5.0.0 => 5.22.5
    vite: ^6.0.0 => 6.2.0

Severity

annoyance

Additional Information

No response

@shfx
Copy link

shfx commented Apr 2, 2025

I've noticed that moving css import from +layout.svelte to hooks.client.ts fixes the issue.

@eltigerchino eltigerchino added the bug Something isn't working label Apr 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants