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 packaging, 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 vite build, and it does not package Tailwind in real-time. Finally, I use chokidar to watch for files in the src directory and execute vite build.
"scripts": {
"watch-build": "chokidar './src/**/*' -c 'vite build'"
},