Closed sebas0811buitrago closed 1 year ago
It is not support cli watch mode, you can use vite config file to use watch mode and but watch mode is not support for emitting typescript declaration file.
The watch mode setting is the same as vite watch mode.
export default defineConfig({
plugins: [
buildPlugin({
fileBuild: {
emitDeclaration: true,
watch: {},
},
}),
],
});
@sebas0811buitrago You can use a crutch in vite.config.js
const watch = process.argv.join().includes('--watch')
? {
include: ['src/**'],
}
: null;
console.log(watch);
export default defineConfig({
plugins: [
buildPlugin({
fileBuild: {
emitDeclaration: true,
watch
},
}),
],
});
if I run
npx vite build --watch
it just build one time and doesn't wait for changes to recompile again, but without the plugin it works well.