@rspack/plugin-react-refresh 1.3.1 → 1.4.1
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 +20 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +4 -1
- package/exports/index.cjs +4 -0
- package/exports/index.d.cts +3 -0
- package/exports/index.d.mts +5 -0
- package/exports/index.mjs +5 -0
- package/package.json +12 -8
package/README.md
CHANGED
@@ -27,6 +27,26 @@ pnpm add @rspack/plugin-react-refresh react-refresh -D
|
|
27
27
|
bun add @rspack/plugin-react-refresh react-refresh -D
|
28
28
|
```
|
29
29
|
|
30
|
+
## Import the plugin
|
31
|
+
|
32
|
+
Import the plugin in your code:
|
33
|
+
|
34
|
+
- ES modules:
|
35
|
+
|
36
|
+
```js
|
37
|
+
// Named import (recommended)
|
38
|
+
import { ReactRefreshRspackPlugin } from "@rspack/plugin-react-refresh";
|
39
|
+
|
40
|
+
// Default import
|
41
|
+
import ReactRefreshRspackPlugin from "@rspack/plugin-react-refresh";
|
42
|
+
```
|
43
|
+
|
44
|
+
- CommonJS:
|
45
|
+
|
46
|
+
```js
|
47
|
+
const ReactRefreshRspackPlugin = require("@rspack/plugin-react-refresh");
|
48
|
+
```
|
49
|
+
|
30
50
|
## Usage
|
31
51
|
|
32
52
|
Enabling [React Fast Refresh](https://reactnative.dev/docs/fast-refresh) functionality primarily involves two aspects: code injection and code transformation.
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
@@ -2,6 +2,8 @@
|
|
2
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
4
|
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.ReactRefreshRspackPlugin = void 0;
|
5
7
|
const node_path_1 = __importDefault(require("node:path"));
|
6
8
|
const options_1 = require("./options");
|
7
9
|
const paths_1 = require("./paths");
|
@@ -101,6 +103,7 @@ class ReactRefreshRspackPlugin {
|
|
101
103
|
});
|
102
104
|
}
|
103
105
|
}
|
106
|
+
exports.ReactRefreshRspackPlugin = ReactRefreshRspackPlugin;
|
104
107
|
ReactRefreshRspackPlugin.deprecated_runtimePaths = paths_1.runtimePaths;
|
105
108
|
ReactRefreshRspackPlugin.loader = 'builtin:react-refresh-loader';
|
106
|
-
|
109
|
+
exports.default = ReactRefreshRspackPlugin;
|
package/package.json
CHANGED
@@ -1,14 +1,16 @@
|
|
1
1
|
{
|
2
2
|
"name": "@rspack/plugin-react-refresh",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.4.1",
|
4
4
|
"repository": "https://github.com/rspack-contrib/rspack-plugin-react-refresh",
|
5
5
|
"license": "MIT",
|
6
|
-
"description": "React refresh plugin for
|
7
|
-
"main": "
|
8
|
-
"
|
6
|
+
"description": "React refresh plugin for Rspack",
|
7
|
+
"main": "exports/index.cjs",
|
8
|
+
"type": "commonjs",
|
9
|
+
"types": "exports/index.d.cts",
|
9
10
|
"exports": {
|
10
11
|
".": {
|
11
|
-
"
|
12
|
+
"require": "./exports/index.cjs",
|
13
|
+
"default": "./exports/index.mjs"
|
12
14
|
},
|
13
15
|
"./react-refresh": "./client/reactRefresh.js",
|
14
16
|
"./react-refresh-entry": "./client/reactRefreshEntry.js",
|
@@ -17,7 +19,8 @@
|
|
17
19
|
},
|
18
20
|
"files": [
|
19
21
|
"client",
|
20
|
-
"dist"
|
22
|
+
"dist",
|
23
|
+
"exports"
|
21
24
|
],
|
22
25
|
"simple-git-hooks": {
|
23
26
|
"pre-commit": "npx nano-staged"
|
@@ -29,6 +32,8 @@
|
|
29
32
|
},
|
30
33
|
"devDependencies": {
|
31
34
|
"@biomejs/biome": "^1.9.4",
|
35
|
+
"@continuous-auth/client": "2.3.2",
|
36
|
+
"@rslib/core": "^0.6.7",
|
32
37
|
"@rspack/core": "1.3.1",
|
33
38
|
"@types/jest": "29.5.14",
|
34
39
|
"@types/node": "^22.13.17",
|
@@ -44,8 +49,7 @@
|
|
44
49
|
"simple-git-hooks": "^2.12.1",
|
45
50
|
"ts-jest": "29.3.1",
|
46
51
|
"ts-node": "^10.9.2",
|
47
|
-
"typescript": "5.8.2"
|
48
|
-
"@continuous-auth/client": "2.3.2"
|
52
|
+
"typescript": "5.8.2"
|
49
53
|
},
|
50
54
|
"dependencies": {
|
51
55
|
"error-stack-parser": "^2.1.4",
|