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
I initially noticed that vite-node was not performing esm/cjs interop on third party dependencies, when I expected it to out of the box (and was pretty sure it had previously). Digging into this further, it looks like this is due to #3446 - the moduleDirectories array is initialized to [] in server.ts so that VITE_NODE_DEPS_MODULE_DIRECTORIES can be added to it, however the default of ['/node_modules/'] is not applied until it's used in externalize.ts (and so the fallback codepath is never hit)
Describe the bug
I initially noticed that vite-node was not performing esm/cjs interop on third party dependencies, when I expected it to out of the box (and was pretty sure it had previously). Digging into this further, it looks like this is due to #3446 - the moduleDirectories array is initialized to
[]
in server.ts so thatVITE_NODE_DEPS_MODULE_DIRECTORIES
can be added to it, however the default of['/node_modules/']
is not applied until it's used in externalize.ts (and so the fallback codepath is never hit)Reproduction
https://stackblitz.com/edit/vitest-dev-vitest-5ibjqp
System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: