You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/vue-next instead.
Transitive dependencies can't be excluded from pre-bundling.
The optimizeDeps.exclude option only seems to work for direct dependencies.
I'm trying to achieve something like rollup's output.globals for vite.
I have written a vite plugin that does this, but it does not work for transitive dependencies since they have already been pre-bundled and therefore the plugin's resolveId is never invoked for them. (even though they are included in optimizeDeps.exclude)
System Info
vite version: 2.0.4
Operating System: Windows
Node version: 14.16.0
Package manager (npm/yarn/pnpm) and version: npm 6.14.11
The text was updated successfully, but these errors were encountered:
Looks like this is the same as #5688. Though this was created earlier, there was more discussion in that issue, so I'll close this in favour of that. Thanks for bringing this up!
Describe the bug
Transitive dependencies can't be excluded from pre-bundling.
The
optimizeDeps.exclude
option only seems to work for direct dependencies.I'm trying to achieve something like rollup's
output.globals
for vite.I have written a vite plugin that does this, but it does not work for transitive dependencies since they have already been pre-bundled and therefore the plugin's
resolveId
is never invoked for them. (even though they are included inoptimizeDeps.exclude
)System Info
vite
version: 2.0.4The text was updated successfully, but these errors were encountered: