Replies: 2 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.
2 replies
-
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.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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