Skip to content

Overrides Rspack with latest/beta/nightly/canary version

License

Notifications You must be signed in to change notification settings

rspack-contrib/install-rspack

Repository files navigation

install-rspack

Install Rspack in your project, with support for canary versions.

Usage

To install a canary version in your project, run:

npx install-rspack --version 0.7.5-canary-d614005-20240625082730
// package.json
{
  "pnpm": {
    "overrides": {
      "@rspack/core": "npm:@rspack-canary/[email protected]",
      "@rspack/cli": "npm:@rspack-canary/[email protected]"
    },
    "peerDependencyRules": {
      "allowAny": ["@rspack/*"]
    }
  }
}

It's also possible to install a specific version:

npx install-rspack --version 0.7.5

Use npm tag:

npx install-rspack  # default `npx install-rspack --version latest`
npx install-rspack --version canary
npx install-rspack --version nightly
npx install-rspack --version beta

Specify the path of a package.json

npx install-rspack --version 0.7.5-canary-d614005-20240625082730 --path ./foo/app/package.json

CI mode

Skip all interactive actions

CI=true npx install-rspack --version 0.7.5-canary-d614005-20240625082730
# or
CI=true npx install-rspack --version 0.7.5-canary-d614005-20240625082730 --pm pnpm --path ./foo/app/package.json

Credits

Thanks to: