Skip to content

Replace rm -rf in vite-plugin build with a cross-platform dist cleanup #2

Description

@rioredwards

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions