Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Comment on lines +13 to +14
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new “Versions” section implies that users should install 2.x for Rspack v2, but this package is currently version 1.6.2 (see package.json). Either update the mapping to reflect the actual published major versions, or bump the package to 2.x as part of this change so the documentation stays accurate.

Suggested change
- `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.
- `1.x`: For Rspack v2.
- For Rspack v1, use the matching older release and refer to that release's README for the appropriate usage guide.

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 1.x usage-guide link points to the rstackjs/rspack-dev-server repository and the #rspackdev-server anchor, which appears unrelated to this plugin. Please update it to the correct location for the @rspack/plugin-react-refresh v1.x documentation (likely this repo’s v1.x branch README, with the right anchor).

Suggested change
- `1.x`: For Rspack v1, see [v1.x - README](https://github.com/rstackjs/rspack-dev-server/tree/v1.x#rspackdev-server) for usage guide.
- `1.x`: For Rspack v1, see [v1.x - README](https://github.com/web-infra-dev/rspack/tree/v1.x/packages/rspack-plugin-react-refresh#readme) for usage guide.

Copilot uses AI. Check for mistakes.

## Installation

First you need to install this plugin and its dependencies:
Expand Down
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
},
Comment on lines +50 to +54
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rspack/core is referenced in exported type declarations (e.g., import type { Compiler } from '@rspack/core'), so TypeScript consumers without @rspack/core installed will get “Cannot find module '@rspack/core'” errors. Marking it as an optional peer can hide the missing-peer warning from package managers; consider making it a required peer, or explicitly documenting when/why consumers can omit it (e.g., JS-only usage).

Suggested change
"peerDependenciesMeta": {
"@rspack/core": {
"optional": true
}
},

Copilot uses AI. Check for mistakes.
"packageManager": "pnpm@10.33.0",
"publishConfig": {
"access": "public",
Expand Down
Loading