Skip to content

Conversation

dominikg
Copy link
Member

No description provided.

@eltigerchino eltigerchino linked an issue Jul 29, 2025 that may be closed by this pull request
Co-authored-by: Tee Ming <chewteeming01@gmail.com>
Co-authored-by: Tee Ming <chewteeming01@gmail.com>
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