Skip to content
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

Emit separate chunks for each component #244

Open
Bilge opened this issue Jan 12, 2025 · 0 comments
Open

Emit separate chunks for each component #244

Bilge opened this issue Jan 12, 2025 · 0 comments

Comments

@Bilge
Copy link

Bilge commented Jan 12, 2025

How can I configure webpack to emit separate chunks for each Svelte 5 component? It seems Vite accomplishes this with very little persuasion, but in my multi-page application, all I have is one output for each entrypoint and I cannot convince webpack to split out the components, even with a custom splitChunks plugin configuration, such as the following.

cacheGroups: {
    svelte: {
        test(module) {
            return module.resource && module.resource.endsWith('.svelte');
        },
    },
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant