@rsbuild/plugin-react 1.4.4 → 2.0.0-alpha.3
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 +1 -5
- package/dist/index.js +1 -4
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -107,14 +107,10 @@ function applyReactProfiler(api) {
|
|
|
107
107
|
})() ? 'react-dom/client$' : 'react-dom$', 'react-dom/profiling'), chain.resolve.alias.set('scheduler/tracing', 'scheduler/tracing-profiling'));
|
|
108
108
|
});
|
|
109
109
|
}
|
|
110
|
-
const isDefaultPreset = (config)=>{
|
|
111
|
-
let { performance, splitChunks } = config;
|
|
112
|
-
return performance.chunkSplit && 'object' == typeof splitChunks && 0 === Object.keys(splitChunks).length ? performance.chunkSplit?.strategy === 'split-by-experience' : 'object' == typeof splitChunks && (!splitChunks.preset || 'default' === splitChunks.preset);
|
|
113
|
-
};
|
|
114
110
|
function applySplitChunksRule(api, options) {
|
|
115
111
|
api.modifyBundlerChain((chain, { environment, isProd })=>{
|
|
116
112
|
let { config } = environment;
|
|
117
|
-
if (
|
|
113
|
+
if ('split-by-experience' !== config.performance.chunkSplit.strategy || !1 === options) return;
|
|
118
114
|
let normalizedOptions = !0 === options ? {
|
|
119
115
|
react: !0,
|
|
120
116
|
router: !0
|
package/dist/index.js
CHANGED
|
@@ -85,10 +85,7 @@ function applyReactProfiler(api) {
|
|
|
85
85
|
function applySplitChunksRule(api, options) {
|
|
86
86
|
api.modifyBundlerChain((chain, { environment, isProd })=>{
|
|
87
87
|
let { config } = environment;
|
|
88
|
-
if (!
|
|
89
|
-
let { performance, splitChunks } = config;
|
|
90
|
-
return performance.chunkSplit && 'object' == typeof splitChunks && 0 === Object.keys(splitChunks).length ? performance.chunkSplit?.strategy === 'split-by-experience' : 'object' == typeof splitChunks && (!splitChunks.preset || 'default' === splitChunks.preset);
|
|
91
|
-
})(config) || 'web' !== config.output.target || !1 === options) return;
|
|
88
|
+
if ('split-by-experience' !== config.performance.chunkSplit.strategy || !1 === options) return;
|
|
92
89
|
let normalizedOptions = !0 === options ? {
|
|
93
90
|
react: !0,
|
|
94
91
|
router: !0
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/plugin-react",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-alpha.3",
|
|
4
4
|
"description": "React plugin for Rsbuild",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -29,11 +29,11 @@
|
|
|
29
29
|
"@rslib/core": "0.19.3",
|
|
30
30
|
"@types/node": "^24.10.9",
|
|
31
31
|
"typescript": "^5.9.3",
|
|
32
|
-
"@
|
|
33
|
-
"@
|
|
32
|
+
"@scripts/test-helper": "1.0.1",
|
|
33
|
+
"@rsbuild/core": "2.0.0-alpha.3"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@rsbuild/core": "^
|
|
36
|
+
"@rsbuild/core": "^2.0.0-0"
|
|
37
37
|
},
|
|
38
38
|
"publishConfig": {
|
|
39
39
|
"access": "public",
|