Replies: 3 comments 5 replies
-
Check if you have emptyOutDir set to true in the vite.config.js. Setting this to false will stop previous files from being removed and just overwrite the newly built files.
|
Beta Was this translation helpful? Give feedback.
-
Same issue here. tsc does it's thing but then vite build wipes out the files. I am leaning toward a node script using rimraf to manually get in a clean state before building. |
Beta Was this translation helpful? Give feedback.
-
Is there an explanation somewhere of how to use tsc and vite? As I understand it they should not be writing to the same directory since they will race/fight each other. Should it not be: What is not clear to me is how to get my non-TypeScript .js into the (non-git and constantly emptied) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
on the package.json scripts:
Im using this "build": "tsc && vite build" to generate the types and the build files.
But as soon as the tsc build finishes the vite build command clears the dist folder and creates js files without any types.
I wonder if there is any good solution to this.
I tried rollup-plugin-typescript2 but it has lots of issues with monorepo setup.
Beta Was this translation helpful? Give feedback.
All reactions