@rsbuild/plugin-react 0.3.7 → 0.3.9
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.js +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -155,11 +155,11 @@ var import_shared4 = require("@rsbuild/shared");
|
|
|
155
155
|
var REACT_REFRESH_PATH = require.resolve("react-refresh");
|
|
156
156
|
var REACT_REFRESH_DIR_PATH = import_node_path.default.dirname(REACT_REFRESH_PATH);
|
|
157
157
|
var applyBasicReactSupport = (api, options) => {
|
|
158
|
-
api.modifyBundlerChain(async (chain, { CHAIN_ID, isProd: isProd2, target }) => {
|
|
158
|
+
api.modifyBundlerChain(async (chain, { CHAIN_ID, isDev, isProd: isProd2, target }) => {
|
|
159
159
|
const config = api.getNormalizedConfig();
|
|
160
160
|
const usingHMR = (0, import_shared4.isUsingHMR)(config, { isProd: isProd2, target });
|
|
161
161
|
const reactOptions = {
|
|
162
|
-
development:
|
|
162
|
+
development: isDev,
|
|
163
163
|
refresh: usingHMR,
|
|
164
164
|
runtime: "automatic",
|
|
165
165
|
...options.swcReactOptions
|
package/dist/index.mjs
CHANGED
|
@@ -145,11 +145,11 @@ import {
|
|
|
145
145
|
var REACT_REFRESH_PATH = __require.resolve("react-refresh");
|
|
146
146
|
var REACT_REFRESH_DIR_PATH = path2.dirname(REACT_REFRESH_PATH);
|
|
147
147
|
var applyBasicReactSupport = (api, options) => {
|
|
148
|
-
api.modifyBundlerChain(async (chain, { CHAIN_ID, isProd: isProd2, target }) => {
|
|
148
|
+
api.modifyBundlerChain(async (chain, { CHAIN_ID, isDev, isProd: isProd2, target }) => {
|
|
149
149
|
const config = api.getNormalizedConfig();
|
|
150
150
|
const usingHMR = isUsingHMR(config, { isProd: isProd2, target });
|
|
151
151
|
const reactOptions = {
|
|
152
|
-
development:
|
|
152
|
+
development: isDev,
|
|
153
153
|
refresh: usingHMR,
|
|
154
154
|
runtime: "automatic",
|
|
155
155
|
...options.swcReactOptions
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/plugin-react",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.9",
|
|
4
4
|
"description": "React plugin for Rsbuild",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -22,18 +22,18 @@
|
|
|
22
22
|
"dist"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@rspack/plugin-react-refresh": "0.5.
|
|
25
|
+
"@rspack/plugin-react-refresh": "0.5.2",
|
|
26
26
|
"react-refresh": "^0.14.0",
|
|
27
|
-
"@rsbuild/shared": "0.3.
|
|
27
|
+
"@rsbuild/shared": "0.3.9"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@types/node": "16.x",
|
|
31
31
|
"typescript": "^5.3.0",
|
|
32
|
-
"@rsbuild/core": "0.3.
|
|
33
|
-
"@scripts/test-helper": "0.3.
|
|
32
|
+
"@rsbuild/core": "0.3.9",
|
|
33
|
+
"@scripts/test-helper": "0.3.9"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@rsbuild/core": "^0.3.
|
|
36
|
+
"@rsbuild/core": "^0.3.9"
|
|
37
37
|
},
|
|
38
38
|
"publishConfig": {
|
|
39
39
|
"access": "public",
|