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
transformMode is now moved to server.transformMode. This option is highly discouraged to use. If you need to change the transform mode, use the new option testTransformMode instead to control the mode based on the running test, not the current file path. By default, tests with jsdom or happy-dom use web transform mode, and tests using node or edge environment use ssr mode. If you have a custom environment, it should provide transformMode property.
Custom environment now should be processed before Vitest can consume it. It means that you cannot specify a path to a TS file or use import paths that should be processed by Vite.
To address speed issues in some applications, Vitest now provides experimentalVmThreads pool to run your tests using VM Sandboxes environment. Make sure you understand all pitfalls of this pool before opening an issue.
Most of deps. options are now moved to server.deps with a deprecation warning. Please, consider using deps.optimizer instead of deps.inline/deps.external. Ideally, we would like to move away from using server.deps.inline altogether.
vite-node: Make CLI arguments parsing behavior consistent with node/tsx/ts-node - by @rxliuli in #3574(1cd4e)
You now have to provide CLI arguments before the entry point. For example, instead of vite-node index.ts --watch, you now have to do vite-node --watch index.ts.
deps.optimizer is now enabled by default. This means that Vitest will bundle specified dependencies before running your tests. This field inherits options from optimizeDeps and ssr.optimizeDeps which are populated by other plugins (like, Svelte).
This option was introduced to support aliasing inside external packages. Please, use deps.optimizer.web instead. If you test Node.js applications, consider adding external packages to server.deps.inline.