-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
resolveId
is called before buildStart
with enforce: 'pre'
#5616
Comments
It looks like > vitest
@resolveId(pre) { source: 'vitest' }
@resolveId(pre) { source: 'vitest' }
@buildStart(pre)
@buildStart(normal)
DEV v1.5.1 /home/projects/wmaivylmj.github
... I remembered someone mentioned that |
This vitest/packages/vitest/src/node/core.ts Line 110 in 597e0c2
Quick logging from plugin shows something like this: @configureServer(pre)
@resolveId(pre) { source: 'vitest' }
@resolveId(pre) { source: 'vitest' }
@configureServer(normal)
@buildStart(pre)
@buildStart(normal) @sagargurtu Can you explain what is your use case? The linked discussion mentioned |
Hi! I was not aware of this and the linked discussion until @chandu filed Septh/rollup-plugin-node-externals#30 which I fixed by not relying on However I do believe that this is a bug that should be fixed in Vitest because the order in which the hooks are called is clearly defined by Rollup's documentation and diverging from that order is wrong (and my plugin might not be the only one affected). |
resolveId
is called before buildStart
with enforce: 'pre'
Awesome! Thanks, guys. 👍 |
Describe the bug
buildStart()
is not called for plugins withenforce: 'pre'
.Reproduction
https://stackblitz.com/edit/vitest-dev-vitest-gdhqm5
System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: