feat(create-vite): add @types/node to typescript templates#18642
Conversation
|
If we go in that direction, I think we should also add |
|
Setting that has a different semantic to a separate file: https://www.typescriptlang.org/tsconfig/#types, so I'm not really sure if we should change that |
|
Yeah I know it's different, but that the goal: you don't want to have |
We do use a lot of process.env in our frontend code, particularly process.env.NODE_ENV == "development" to switch to a dev rest api url. Vite also allows process.env in app files https://vite.dev/guide/env-and-mode#node-env-and-modes |
|
While this is supported for compatibility with the ecosystem, Vite way of doing this is |
|
Since #20132 we have started using the Would you like to update this PR with that, or open a new PR? |
|
Hi @bluwy , I have followed Arnaud's propose and added "node" for the tsconfig.node.json file. |
Closes #18600