vite.config.ts
isn't transpiled when used with ts-node
#9112
Labels
p4-important
Violate documented behavior or significantly improves performance (priority)
regression
The issue only appears after a new release
Describe the bug
When using Vite with
ts-node
(Cypress does so), thevite.config.ts
isn't transpiled, and is parsed directly byts-node
.Therefore, if the project doesn't have
"type": "module"
configured (most old projects don't), and usesimport.meta.url
in the config file (create-vue
recommends configuringalias
usingimport.meta.url
), a SyntaxError would be thrown when parsing the config file.It is a regression introduced in #8556
Reproduction
Source code: https://github.com/sodatea/vite-ts-node
Online playground: https://replit.com/@sodatea/vite-ts-node
System Info
Used Package Manager
pnpm
Logs
Validations
The text was updated successfully, but these errors were encountered: