@rsbuild/plugin-react 1.1.1 → 1.3.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 +16 -19
- package/dist/index.js +1 -1
- package/package.json +8 -8
package/dist/index.cjs
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
let __rslib_import_meta_url__ = 'undefined' == typeof document ? new (require('url'.replace('', ''))).URL('file:' + __filename).href : document.currentScript && document.currentScript.src || new URL('main.js', document.baseURI).href;
|
|
3
3
|
var __webpack_modules__ = {
|
|
4
4
|
"@rspack/plugin-react-refresh": function(module) {
|
|
5
|
-
module.exports = import("@rspack/plugin-react-refresh")
|
|
5
|
+
module.exports = import("@rspack/plugin-react-refresh").then(function(module) {
|
|
6
|
+
return module;
|
|
7
|
+
});
|
|
6
8
|
}
|
|
7
9
|
}, __webpack_module_cache__ = {};
|
|
8
10
|
function __webpack_require__(moduleId) {
|
|
@@ -13,23 +15,17 @@ function __webpack_require__(moduleId) {
|
|
|
13
15
|
};
|
|
14
16
|
return __webpack_modules__[moduleId](module, module.exports, __webpack_require__), module.exports;
|
|
15
17
|
}
|
|
16
|
-
__webpack_require__.n =
|
|
17
|
-
var getter = module && module.__esModule ?
|
|
18
|
-
return module.default;
|
|
19
|
-
} : function() {
|
|
20
|
-
return module;
|
|
21
|
-
};
|
|
18
|
+
__webpack_require__.n = (module)=>{
|
|
19
|
+
var getter = module && module.__esModule ? ()=>module.default : ()=>module;
|
|
22
20
|
return __webpack_require__.d(getter, {
|
|
23
21
|
a: getter
|
|
24
22
|
}), getter;
|
|
25
|
-
}, __webpack_require__.d =
|
|
23
|
+
}, __webpack_require__.d = (exports1, definition)=>{
|
|
26
24
|
for(var key in definition)__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key) && Object.defineProperty(exports1, key, {
|
|
27
25
|
enumerable: !0,
|
|
28
26
|
get: definition[key]
|
|
29
27
|
});
|
|
30
|
-
}, __webpack_require__.o =
|
|
31
|
-
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
32
|
-
}, __webpack_require__.r = function(exports1) {
|
|
28
|
+
}, __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop), __webpack_require__.r = (exports1)=>{
|
|
33
29
|
'undefined' != typeof Symbol && Symbol.toStringTag && Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
34
30
|
value: 'Module'
|
|
35
31
|
}), Object.defineProperty(exports1, '__esModule', {
|
|
@@ -37,10 +33,10 @@ __webpack_require__.n = function(module) {
|
|
|
37
33
|
});
|
|
38
34
|
};
|
|
39
35
|
var __webpack_exports__ = {};
|
|
40
|
-
(()=>{
|
|
36
|
+
for(var __webpack_i__ in (()=>{
|
|
41
37
|
__webpack_require__.r(__webpack_exports__), __webpack_require__.d(__webpack_exports__, {
|
|
42
|
-
|
|
43
|
-
|
|
38
|
+
PLUGIN_REACT_NAME: ()=>PLUGIN_REACT_NAME,
|
|
39
|
+
pluginReact: ()=>pluginReact
|
|
44
40
|
});
|
|
45
41
|
let external_node_module_namespaceObject = require("node:module"), external_node_path_namespaceObject = require("node:path");
|
|
46
42
|
var external_node_path_default = __webpack_require__.n(external_node_path_namespaceObject);
|
|
@@ -72,7 +68,7 @@ var __webpack_exports__ = {};
|
|
|
72
68
|
let { config } = environment;
|
|
73
69
|
if (!(isDev && config.dev.hmr && 'web' === target) || !options.fastRefresh) return;
|
|
74
70
|
chain.resolve.alias.set('react-refresh', external_node_path_default().dirname(REACT_REFRESH_PATH));
|
|
75
|
-
let {
|
|
71
|
+
let { ReactRefreshRspackPlugin } = await Promise.resolve().then(__webpack_require__.bind(__webpack_require__, "@rspack/plugin-react-refresh"));
|
|
76
72
|
chain.plugin(CHAIN_ID.PLUGIN.REACT_FAST_REFRESH).use(ReactRefreshRspackPlugin, [
|
|
77
73
|
{
|
|
78
74
|
include: [
|
|
@@ -141,9 +137,10 @@ var __webpack_exports__ = {};
|
|
|
141
137
|
'rspack' === api.context.bundlerType && (applyBasicReactSupport(api, finalOptions), finalOptions.enableProfiler && applyReactProfiler(api)), applySplitChunksRule(api, null == finalOptions ? void 0 : finalOptions.splitChunks);
|
|
142
138
|
}
|
|
143
139
|
});
|
|
144
|
-
})()
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
140
|
+
})(), exports.PLUGIN_REACT_NAME = __webpack_exports__.PLUGIN_REACT_NAME, exports.pluginReact = __webpack_exports__.pluginReact, __webpack_exports__)-1 === [
|
|
141
|
+
"PLUGIN_REACT_NAME",
|
|
142
|
+
"pluginReact"
|
|
143
|
+
].indexOf(__webpack_i__) && (exports[__webpack_i__] = __webpack_exports__[__webpack_i__]);
|
|
144
|
+
Object.defineProperty(exports, '__esModule', {
|
|
148
145
|
value: !0
|
|
149
146
|
});
|
package/dist/index.js
CHANGED
|
@@ -28,7 +28,7 @@ let react_require = (0, __WEBPACK_EXTERNAL_MODULE_node_module_ab9f2194__.createR
|
|
|
28
28
|
let { config } = environment;
|
|
29
29
|
if (!(isDev && config.dev.hmr && 'web' === target) || !options.fastRefresh) return;
|
|
30
30
|
chain.resolve.alias.set('react-refresh', __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__.default.dirname(REACT_REFRESH_PATH));
|
|
31
|
-
let {
|
|
31
|
+
let { ReactRefreshRspackPlugin } = await import("@rspack/plugin-react-refresh");
|
|
32
32
|
chain.plugin(CHAIN_ID.PLUGIN.REACT_FAST_REFRESH).use(ReactRefreshRspackPlugin, [
|
|
33
33
|
{
|
|
34
34
|
include: [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/plugin-react",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "React plugin for Rsbuild",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -22,15 +22,15 @@
|
|
|
22
22
|
"dist"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@rspack/plugin-react-refresh": "~1.
|
|
26
|
-
"react-refresh": "^0.
|
|
25
|
+
"@rspack/plugin-react-refresh": "~1.4.1",
|
|
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.6.6",
|
|
30
|
+
"@types/node": "^22.14.1",
|
|
31
|
+
"typescript": "^5.8.3",
|
|
32
|
+
"@rsbuild/core": "1.3.10",
|
|
33
|
+
"@scripts/test-helper": "1.0.1"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"@rsbuild/core": "1.x"
|