The published Vite plugin package uses a POSIX-only cleanup step in its build script. That breaks Windows builds for contributors and anyone building the package from source.
Problem
packages/vite-plugin-component-preview/package.json uses rm -rf dist in the build script
- this works on macOS and Linux shells but fails in standard Windows environments
Suggested fix
- Replace the cleanup step with a cross-platform approach such as
fs.rm, rimraf, or a small Node script
- Keep the existing build behavior unchanged apart from platform compatibility
- Add a quick CI or script-level check if you want to prevent regressions
Relevant files
packages/vite-plugin-component-preview/package.json
The published Vite plugin package uses a POSIX-only cleanup step in its build script. That breaks Windows builds for contributors and anyone building the package from source.
Problem
packages/vite-plugin-component-preview/package.jsonusesrm -rf distin the build scriptSuggested fix
fs.rm,rimraf, or a small Node scriptRelevant files
packages/vite-plugin-component-preview/package.json