mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[GH-ISSUE #538] Per-environment optimizeDeps overrides top-level exclude entries set by other Vite plugins #112
Labels
No labels
enhancement
enhancement
good first issue
help wanted
nextjs-tracking
nextjs-tracking
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vinext#112
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Jbithell on GitHub (Mar 14, 2026).
Original GitHub issue: https://github.com/cloudflare/vinext/issues/538
When a Vite plugin (e.g.
@lingui/vite-plugin) adds packages to the top-leveloptimizeDeps.excludeduring itsconfighook, vinext's per-environmentoptimizeDepsconfiguration replaces those entries entirely. This forces downstream projects to add a secondary Vite plugin that runs after vinext to re-patch each environment's exclude list.Repro:
config.optimizeDeps.exclude.push(...)(e.g.@lingui/vite-pluginexcludes @lingui/macro, @lingui/core/macro, @lingui/react/macro)vinext devCurrent workaround:
Expected:
vinext should merge top-level
optimizeDeps.excludeentries into its per-environment configs rather than replacing them.