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
Rollup and Vite disagree on the precise semantics of the skipSelf option to this.resolve().
The Rollup docs say:
If you pass skipSelf: true, then the resolveId hook of the plugin from which this.resolve is called will be skipped when resolving. When other plugins themselves also call this.resolve in their resolveId hooks with the exact same source and importer while handling the original this.resolve call, then the resolveId hook of the original plugin will be skipped for those calls as well.
And that is the behavior we observe when using vite preview.
But in vite dev, skipSelf causes a plugin to be skipped during all recursive calls to this.resolve(), even when the source and importer are different.
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
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 vuejs/core instead.
Describe the bug
Rollup and Vite disagree on the precise semantics of the
skipSelf
option tothis.resolve()
.The Rollup docs say:
And that is the behavior we observe when using
vite preview
.But in
vite dev
,skipSelf
causes a plugin to be skipped during all recursive calls tothis.resolve()
, even when the source and importer are different.Reproduction
https://stackblitz.com/edit/vitejs-vite-ftyzvj?file=vite.config.js
Steps to reproduce
In the Stackblitz reproduction, if you
npm run dev
the app will print "found second".If you instead run
npm run build && npm run preview
, the app will print "found first".System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: