@rsbuild/plugin-react 0.2.4 → 0.2.6
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/dist/index.d.ts +1 -1
- package/dist/index.js +4 -4
- package/dist/index.mjs +4 -4
- package/package.json +4 -6
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -123,15 +123,15 @@ var applySplitChunksRule = (api, options = {
|
|
|
123
123
|
"react",
|
|
124
124
|
"react-dom",
|
|
125
125
|
"scheduler",
|
|
126
|
-
...(0, import_shared3.isProd)() ? [] : ["react-refresh",
|
|
126
|
+
...(0, import_shared3.isProd)() ? [] : ["react-refresh", /@rspack[\\/]plugin-react-refresh/]
|
|
127
127
|
];
|
|
128
128
|
}
|
|
129
129
|
if (options.router) {
|
|
130
130
|
extraGroups.router = [
|
|
131
131
|
"react-router",
|
|
132
132
|
"react-router-dom",
|
|
133
|
-
"
|
|
134
|
-
|
|
133
|
+
"history",
|
|
134
|
+
/@remix-run[\\/]router/
|
|
135
135
|
];
|
|
136
136
|
}
|
|
137
137
|
if (!Object.keys(extraGroups).length) {
|
|
@@ -217,7 +217,7 @@ var applyBasicReactSupport = (api) => {
|
|
|
217
217
|
|
|
218
218
|
// src/utils.ts
|
|
219
219
|
var import_fs = __toESM(require("fs"));
|
|
220
|
-
var import_semver = __toESM(require("semver"));
|
|
220
|
+
var import_semver = __toESM(require("@rsbuild/shared/semver"));
|
|
221
221
|
var import_shared5 = require("@rsbuild/shared");
|
|
222
222
|
var isBeyondReact17 = async (cwd) => {
|
|
223
223
|
const pkgPath = await (0, import_shared5.findUp)({ cwd, filename: "package.json" });
|
package/dist/index.mjs
CHANGED
|
@@ -109,15 +109,15 @@ var applySplitChunksRule = (api, options = {
|
|
|
109
109
|
"react",
|
|
110
110
|
"react-dom",
|
|
111
111
|
"scheduler",
|
|
112
|
-
...isProd() ? [] : ["react-refresh",
|
|
112
|
+
...isProd() ? [] : ["react-refresh", /@rspack[\\/]plugin-react-refresh/]
|
|
113
113
|
];
|
|
114
114
|
}
|
|
115
115
|
if (options.router) {
|
|
116
116
|
extraGroups.router = [
|
|
117
117
|
"react-router",
|
|
118
118
|
"react-router-dom",
|
|
119
|
-
"
|
|
120
|
-
|
|
119
|
+
"history",
|
|
120
|
+
/@remix-run[\\/]router/
|
|
121
121
|
];
|
|
122
122
|
}
|
|
123
123
|
if (!Object.keys(extraGroups).length) {
|
|
@@ -205,7 +205,7 @@ var applyBasicReactSupport = (api) => {
|
|
|
205
205
|
|
|
206
206
|
// src/utils.ts
|
|
207
207
|
import fs from "fs";
|
|
208
|
-
import semver from "semver";
|
|
208
|
+
import semver from "@rsbuild/shared/semver";
|
|
209
209
|
import { findUp } from "@rsbuild/shared";
|
|
210
210
|
var isBeyondReact17 = async (cwd) => {
|
|
211
211
|
const pkgPath = await findUp({ cwd, filename: "package.json" });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/plugin-react",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.6",
|
|
4
4
|
"description": "React plugin for Rsbuild",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -24,15 +24,13 @@
|
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@rspack/plugin-react-refresh": "0.4.3",
|
|
26
26
|
"react-refresh": "^0.14.0",
|
|
27
|
-
"
|
|
28
|
-
"@rsbuild/shared": "0.2.4"
|
|
27
|
+
"@rsbuild/shared": "0.2.6"
|
|
29
28
|
},
|
|
30
29
|
"devDependencies": {
|
|
31
30
|
"@types/node": "16.x",
|
|
32
|
-
"@types/semver": "^7.5.4",
|
|
33
31
|
"typescript": "^5.3.0",
|
|
34
|
-
"@rsbuild/
|
|
35
|
-
"@rsbuild/
|
|
32
|
+
"@rsbuild/test-helper": "0.2.6",
|
|
33
|
+
"@rsbuild/core": "0.2.6"
|
|
36
34
|
},
|
|
37
35
|
"publishConfig": {
|
|
38
36
|
"access": "public",
|