@rspack/plugin-react-refresh 2.0.1 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -11,7 +11,7 @@ React refresh plugin for [Rspack](https://github.com/web-infra-dev/rspack).
11
11
  ## Versions
12
12
 
13
13
  - `2.x`: For Rspack v2.
14
- - `1.x`: For Rspack v1, see [v1.x - README](https://github.com/rstackjs/rspack-dev-server/tree/v1.x#rspackdev-server) for usage guide.
14
+ - `1.x`: For Rspack v1, see [v1.x - README](https://github.com/rstackjs/rspack-plugin-react-refresh/tree/v1.x?tab=readme-ov-file#rspackplugin-react-refresh) for usage guide.
15
15
 
16
16
  ## Installation
17
17
 
@@ -119,13 +119,13 @@ new ReactRefreshPlugin({
119
119
  ### exclude
120
120
 
121
121
  - Type: [Rspack.RuleSetCondition](https://rspack.rs/config/module-rules#condition)
122
- - Default: `/node_modules/`
122
+ - Default: `/[\\/]node_modules[\\/]/`
123
123
 
124
124
  Exclude files from being processed by the plugin. The value is the same as the [rule.exclude](https://rspack.rs/config/module-rules#rulesexclude) option in Rspack.
125
125
 
126
126
  ```js
127
127
  new ReactRefreshPlugin({
128
- exclude: [/node_modules/, /some-other-module/],
128
+ exclude: [/[\\/]node_modules[\\/]/, /some-other-module/],
129
129
  });
130
130
  ```
131
131
 
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@ const d = (object, property, defaultValue)=>{
6
6
  };
7
7
  function normalizeOptions(options) {
8
8
  d(options, 'test', /\.(?:js|jsx|mjs|cjs|ts|tsx|mts|cts)$/);
9
- d(options, 'exclude', /node_modules/i);
9
+ d(options, 'exclude', /[\\/]node_modules[\\/]/);
10
10
  d(options, 'library');
11
11
  d(options, 'forceEnable', false);
12
12
  d(options, 'injectLoader', true);
package/dist/options.d.ts CHANGED
@@ -20,7 +20,7 @@ export type PluginOptions = {
20
20
  /**
21
21
  * Exclude files from being processed by the plugin.
22
22
  * The value is the same as the `rule.exclude` option in Rspack.
23
- * @default /node_modules/
23
+ * @default /[\\/]node_modules[\\/]/
24
24
  * @see https://rspack.rs/config/module-rules#rulesexclude
25
25
  */
26
26
  exclude?: RuleSetCondition | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspack/plugin-react-refresh",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "repository": "https://github.com/rstackjs/rspack-plugin-react-refresh",
5
5
  "license": "MIT",
6
6
  "description": "React refresh plugin for Rspack",
@@ -23,10 +23,10 @@
23
23
  "pre-commit": "pnpm run lint:write"
24
24
  },
25
25
  "devDependencies": {
26
- "@rslib/core": "^0.21.5",
26
+ "@rslib/core": "^0.22.0",
27
27
  "@rslint/core": "^0.5.3",
28
- "@rspack/core": "2.0.4",
29
- "@rstest/core": "^0.10.2",
28
+ "@rspack/core": "2.0.5",
29
+ "@rstest/core": "^0.10.3",
30
30
  "@types/node": "^24.12.4",
31
31
  "prettier": "^3.8.3",
32
32
  "react-refresh": "^0.18.0",
@@ -34,7 +34,7 @@
34
34
  "typescript": "^6.0.3"
35
35
  },
36
36
  "peerDependencies": {
37
- "@rspack/core": "^2.0.0-0",
37
+ "@rspack/core": "^2.0.0",
38
38
  "react-refresh": ">=0.10.0 <1.0.0"
39
39
  },
40
40
  "peerDependenciesMeta": {