Open smeng9 opened 2 days ago
When following official guides that imports path library or use __dirname in https://vite.dev/guide/build.html#multi-page-app we will encounter typescript errors.
This is not a very good developer experience.
Add @types/node to devDependencies of vite templates.
Add a description section in the document that user needs to import such library or change tsconfig.node.json settings.
No response
Seems fair to me 👍 The tricky thing I guess is that users may want to align the node version to the one they're using locally while calling npm create vite. Maybe that can be separately tackled if needed.
npm create vite
Description
When following official guides that imports path library or use __dirname in https://vite.dev/guide/build.html#multi-page-app we will encounter typescript errors.
This is not a very good developer experience.
Suggested solution
Add @types/node to devDependencies of vite templates.
Alternative
Add a description section in the document that user needs to import such library or change tsconfig.node.json settings.
Additional context
No response
Validations