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

Disable generation of server code #12555

Open
janopae opened this issue Aug 7, 2024 · 2 comments
Open

Disable generation of server code #12555

janopae opened this issue Aug 7, 2024 · 2 comments
Labels
adapters - general Support for functionality general to all adapters vite

Comments

@janopae
Copy link

janopae commented Aug 7, 2024

Describe the problem

SvelteKit seems to always generate files to the .svelte-kit/output/server/ directory – even with export const ssr = false in src/routes/+layout.ts, and even with the static adapter and prerender set to false.

That doesn't seem to make sense if only client code will be shipped.

Describe the proposed solution

It would be great to have a configuration option that disables all generation of server side JavaScript code. This would save build time, disk space, and therefore energy consumption in all local, server-side and CI-based cases where SvelteKit builds are executed.

Alternatives considered

No response

Importance

nice to have

Additional Information

No response

@ilyakamens
Copy link

I'm using SvelteKit, but with a Flask backend. I have no use for the server part of SvelteKit; I only want to use the routing. The additional build takes extra time and is noisy (since I don't use it). Please enable us to disable it. IMO the routing and server functionality shouldn't be coupled. It makes SvelteKit less desirable if it's all-or-nothing.

@eltigerchino eltigerchino added vite adapters - general Support for functionality general to all adapters and removed adapters - general Support for functionality general to all adapters vite labels Oct 25, 2024
@eltigerchino
Copy link
Member

eltigerchino commented Oct 25, 2024

This might be more feasible once we've moved to the Vite Environment API

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adapters - general Support for functionality general to all adapters vite
Projects
None yet
Development

No branches or pull requests

3 participants