From 3caf58df45da626197fe16407ae48e263009569e Mon Sep 17 00:00:00 2001 From: neverland Date: Tue, 7 Apr 2026 22:07:18 +0800 Subject: [PATCH] feat: add optional peer dependency for @rspack/core --- README.md | 5 +++++ package.json | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/README.md b/README.md index a5d30af..f4486df 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,11 @@ React refresh plugin for [Rspack](https://github.com/web-infra-dev/rspack). +## Versions + +- `2.x`: For Rspack v2. +- `1.x`: For Rspack v1, see [v1.x - README](https://github.com/rstackjs/rspack-dev-server/tree/v1.x#rspackdev-server) for usage guide. + ## Installation First you need to install this plugin and its dependencies: diff --git a/package.json b/package.json index 94e74d6..004cd31 100644 --- a/package.json +++ b/package.json @@ -44,8 +44,14 @@ "typescript": "^6.0.2" }, "peerDependencies": { + "@rspack/core": "^2.0.0-0", "react-refresh": ">=0.10.0 <1.0.0" }, + "peerDependenciesMeta": { + "@rspack/core": { + "optional": true + } + }, "packageManager": "pnpm@10.33.0", "publishConfig": { "access": "public",