Skip to content

feat: enable optimizer for server environments during dev #1185

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

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

dominikg
Copy link
Member

No description provided.

@eltigerchino eltigerchino linked an issue Jul 29, 2025 that may be closed by this pull request
if (config.consumer === 'server' && optimizeDeps !== undefined) {
// optimizeDeps is not inherited by server environments so return it here
return {
optimizeDeps
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not entirely happy with this for 2 reasons

  1. this configuration part should probably be moved out of this plugin and into the setup-optimizer plugin, but that requires a bit of refactoring and maybe running vitefu twice.

  2. it replicates the same optimizeDeps for server and client env, but i am not sure yet if the same rules apply

Copy link
Member

@eltigerchino eltigerchino Jul 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it replicates the same optimizeDeps for server and client env, but i am not sure yet if the same rules apply

I was thinking the same thing. Would it be enough for us to just configure the extensions and plugins settings so that esbuild knows how to handle Svelte modules? Then, the user can decide what to include/exclude for optimizing themselves.

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

Successfully merging this pull request may close these issues.

Optimizing for server environments
2 participants