I am developing a multi-platform project using a monorepo, and I want to separate the component library into a very lightweight package. I chose Vite for bundling, but it seems that Vite's development mode does not support this feature. If I use tsc to watch for file changes, the output of the build differs from that of vite build, and it does not bundle Tailwind in real-time. Finally, I use chokidar to watch files in the src directory and execute vite build.
"scripts": {
"watch-build": "chokidar './src/**/*' -c 'vite build'"
},