Skip to content

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

Open
@danielcrabtree

Description

@danielcrabtree

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions