@rsbuild/plugin-react 1.3.4 → 1.4.0
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.cjs +5 -8
- package/dist/index.js +5 -8
- package/package.json +8 -9
package/dist/index.cjs
CHANGED
|
@@ -78,15 +78,12 @@ for(var __webpack_i__ in (()=>{
|
|
|
78
78
|
let { config } = environment;
|
|
79
79
|
if (!(isDev && config.dev.hmr && 'web' === target) || !options1.fastRefresh) return;
|
|
80
80
|
chain.resolve.alias.set('react-refresh', external_node_path_default().dirname(REACT_REFRESH_PATH));
|
|
81
|
-
let { ReactRefreshRspackPlugin } = await Promise.resolve().then(__webpack_require__.bind(__webpack_require__, "@rspack/plugin-react-refresh"));
|
|
81
|
+
let { ReactRefreshRspackPlugin } = await Promise.resolve().then(__webpack_require__.bind(__webpack_require__, "@rspack/plugin-react-refresh")), jsRule = chain.module.rules.get(CHAIN_ID.RULE.JS);
|
|
82
82
|
chain.plugin(CHAIN_ID.PLUGIN.REACT_FAST_REFRESH).use(ReactRefreshRspackPlugin, [
|
|
83
83
|
{
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
exclude: [
|
|
88
|
-
/[\\/]node_modules[\\/]/
|
|
89
|
-
],
|
|
84
|
+
test: jsRule.get('test'),
|
|
85
|
+
include: jsRule.include.values(),
|
|
86
|
+
exclude: jsRule.exclude.values(),
|
|
90
87
|
resourceQuery: {
|
|
91
88
|
not: /^\?raw$/
|
|
92
89
|
},
|
|
@@ -150,7 +147,7 @@ for(var __webpack_i__ in (()=>{
|
|
|
150
147
|
}
|
|
151
148
|
});
|
|
152
149
|
});
|
|
153
|
-
})(api,
|
|
150
|
+
})(api, finalOptions?.splitChunks);
|
|
154
151
|
}
|
|
155
152
|
});
|
|
156
153
|
})(), exports.PLUGIN_REACT_NAME = __webpack_exports__.PLUGIN_REACT_NAME, exports.pluginReact = __webpack_exports__.pluginReact, __webpack_exports__)-1 === [
|
package/dist/index.js
CHANGED
|
@@ -36,15 +36,12 @@ let react_require = createRequire(import.meta.url), PLUGIN_REACT_NAME = 'rsbuild
|
|
|
36
36
|
let { config } = environment;
|
|
37
37
|
if (!(isDev && config.dev.hmr && 'web' === target) || !finalOptions.fastRefresh) return;
|
|
38
38
|
chain.resolve.alias.set('react-refresh', node_path.dirname(REACT_REFRESH_PATH));
|
|
39
|
-
let { ReactRefreshRspackPlugin } = await import("@rspack/plugin-react-refresh");
|
|
39
|
+
let { ReactRefreshRspackPlugin } = await import("@rspack/plugin-react-refresh"), jsRule = chain.module.rules.get(CHAIN_ID.RULE.JS);
|
|
40
40
|
chain.plugin(CHAIN_ID.PLUGIN.REACT_FAST_REFRESH).use(ReactRefreshRspackPlugin, [
|
|
41
41
|
{
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
exclude: [
|
|
46
|
-
/[\\/]node_modules[\\/]/
|
|
47
|
-
],
|
|
42
|
+
test: jsRule.get('test'),
|
|
43
|
+
include: jsRule.include.values(),
|
|
44
|
+
exclude: jsRule.exclude.values(),
|
|
48
45
|
resourceQuery: {
|
|
49
46
|
not: /^\?raw$/
|
|
50
47
|
},
|
|
@@ -108,7 +105,7 @@ let react_require = createRequire(import.meta.url), PLUGIN_REACT_NAME = 'rsbuild
|
|
|
108
105
|
}
|
|
109
106
|
});
|
|
110
107
|
});
|
|
111
|
-
})(api,
|
|
108
|
+
})(api, finalOptions?.splitChunks);
|
|
112
109
|
}
|
|
113
110
|
});
|
|
114
111
|
export { PLUGIN_REACT_NAME, pluginReact };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/plugin-react",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "React plugin for Rsbuild",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -22,27 +22,26 @@
|
|
|
22
22
|
"dist"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@rspack/plugin-react-refresh": "
|
|
25
|
+
"@rspack/plugin-react-refresh": "^1.5.0",
|
|
26
26
|
"react-refresh": "^0.17.0"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@rslib/core": "0.
|
|
30
|
-
"@types/node": "^22.
|
|
31
|
-
"typescript": "^5.
|
|
32
|
-
"@
|
|
33
|
-
"@
|
|
29
|
+
"@rslib/core": "0.12.2",
|
|
30
|
+
"@types/node": "^22.17.2",
|
|
31
|
+
"typescript": "^5.9.2",
|
|
32
|
+
"@rsbuild/core": "1.5.1",
|
|
33
|
+
"@scripts/test-helper": "1.0.1"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"@rsbuild/core": "1.x"
|
|
37
37
|
},
|
|
38
38
|
"publishConfig": {
|
|
39
39
|
"access": "public",
|
|
40
|
-
"provenance": true,
|
|
41
40
|
"registry": "https://registry.npmjs.org/"
|
|
42
41
|
},
|
|
43
42
|
"scripts": {
|
|
44
43
|
"build": "rslib build",
|
|
45
44
|
"dev": "rslib build --watch",
|
|
46
|
-
"bump": "
|
|
45
|
+
"bump": "pnpx bumpp --no-tag"
|
|
47
46
|
}
|
|
48
47
|
}
|