Why does Vitest Browser mode start two Vite servers #7259
-
Hi. I noticed that Vitest browser mode starts two Vite dev servers vitest/packages/vitest/src/node/project.ts Lines 507 to 510 in b526896 I'm curious as to what is the reason why two servers are created rather than have one Vite server. As a plugin developer, what should I be aware of and how should I handle this? Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Here is the rational and also the plan to be changed #6912 For plugin authors, I'd expect there no issue unless it relies on something global hack |
Beta Was this translation helpful? Give feedback.
Here is the rational and also the plan to be changed #6912
For plugin authors, I'd expect there no issue unless it relies on something global hack
globalThis.__myPluginState
. Currently each Vite server is loading a config file separately and thus plugins are instantiated separately, so it shouldn't break Vite/rollup plugin conventions.