@rsbuild/plugin-react 1.4.6 → 2.0.0-rc.2
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 +75 -79
- package/package.json +11 -14
- package/dist/index.cjs +0 -159
- package/dist/react.d.ts +0 -4
package/dist/index.js
CHANGED
|
@@ -1,54 +1,39 @@
|
|
|
1
1
|
import { createRequire } from "node:module";
|
|
2
2
|
import node_path from "node:path";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
let REACT_REFRESH_PATH = options.fastRefresh ? react_require.resolve('react-refresh') : '';
|
|
6
|
-
api.modifyEnvironmentConfig((config, { mergeEnvironmentConfig })=>{
|
|
7
|
-
let isDev = 'development' === config.mode, usingHMR = isDev && config.dev.hmr && 'web' === config.output.target;
|
|
8
|
-
return mergeEnvironmentConfig({
|
|
9
|
-
tools: {
|
|
10
|
-
swc: {
|
|
11
|
-
jsc: {
|
|
12
|
-
parser: {
|
|
13
|
-
syntax: "typescript",
|
|
14
|
-
tsx: !0
|
|
15
|
-
},
|
|
16
|
-
transform: {
|
|
17
|
-
react: {
|
|
18
|
-
development: isDev,
|
|
19
|
-
refresh: usingHMR && options.fastRefresh,
|
|
20
|
-
runtime: 'automatic',
|
|
21
|
-
...options.swcReactOptions
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}, config);
|
|
28
|
-
}), options.swcReactOptions?.runtime === 'preserve' && api.modifyBundlerChain((chain)=>{
|
|
29
|
-
chain.module.parser.merge({
|
|
30
|
-
javascript: {
|
|
31
|
-
jsx: !0
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
}), api.modifyBundlerChain(async (chain, { CHAIN_ID, environment, isDev, target })=>{
|
|
3
|
+
function applySplitChunksRule(api, options) {
|
|
4
|
+
api.modifyBundlerChain((chain, { environment, isProd })=>{
|
|
35
5
|
let { config } = environment;
|
|
36
|
-
if (!(
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
6
|
+
if (!((config)=>{
|
|
7
|
+
let { performance, splitChunks } = config;
|
|
8
|
+
return performance.chunkSplit ? performance.chunkSplit?.strategy === 'split-by-experience' : 'object' == typeof splitChunks && (!splitChunks.preset || 'default' === splitChunks.preset);
|
|
9
|
+
})(config) || 'web' !== config.output.target || !1 === options) return;
|
|
10
|
+
let normalizedOptions = !0 === options ? {
|
|
11
|
+
react: !0,
|
|
12
|
+
router: !0
|
|
13
|
+
} : options, currentConfig = chain.optimization.splitChunks.values();
|
|
14
|
+
if ('object' != typeof currentConfig) return;
|
|
15
|
+
let extraGroups = {};
|
|
16
|
+
normalizedOptions.react && (extraGroups.react = {
|
|
17
|
+
name: 'lib-react',
|
|
18
|
+
test: isProd ? /node_modules[\\/](?:react|react-dom|scheduler)[\\/]/ : /node_modules[\\/](?:react|react-dom|scheduler|react-refresh|@rspack[\\/]plugin-react-refresh)[\\/]/,
|
|
19
|
+
priority: 0
|
|
20
|
+
}), normalizedOptions.router && (extraGroups.router = {
|
|
21
|
+
name: 'lib-router',
|
|
22
|
+
test: /node_modules[\\/](?:react-router|react-router-dom|history|@remix-run[\\/]router)[\\/]/,
|
|
23
|
+
priority: 0
|
|
24
|
+
}), Object.keys(extraGroups).length && chain.optimization.splitChunks({
|
|
25
|
+
...currentConfig,
|
|
26
|
+
cacheGroups: {
|
|
27
|
+
...extraGroups,
|
|
28
|
+
...currentConfig.cacheGroups
|
|
48
29
|
}
|
|
49
|
-
|
|
30
|
+
});
|
|
50
31
|
});
|
|
51
32
|
}
|
|
33
|
+
let src_require = createRequire(import.meta.url), PLUGIN_REACT_NAME = 'rsbuild:react';
|
|
34
|
+
function assertCoreVersion(version) {
|
|
35
|
+
if ('1' === version.split('.')[0]) throw Error('"@rsbuild/plugin-react" v2 requires "@rsbuild/core" >= 2.0. Please upgrade "@rsbuild/core" or use "@rsbuild/plugin-react" v1.');
|
|
36
|
+
}
|
|
52
37
|
function applyReactProfiler(api) {
|
|
53
38
|
let hasReactDomClientCache;
|
|
54
39
|
api.modifyEnvironmentConfig((config, { mergeEnvironmentConfig })=>{
|
|
@@ -70,7 +55,7 @@ function applyReactProfiler(api) {
|
|
|
70
55
|
isProd && (chain.resolve.alias.set((()=>{
|
|
71
56
|
if (void 0 !== hasReactDomClientCache) return hasReactDomClientCache;
|
|
72
57
|
try {
|
|
73
|
-
|
|
58
|
+
src_require.resolve('react-dom/client', {
|
|
74
59
|
paths: [
|
|
75
60
|
api.context.rootPath
|
|
76
61
|
]
|
|
@@ -82,46 +67,57 @@ function applyReactProfiler(api) {
|
|
|
82
67
|
})() ? 'react-dom/client$' : 'react-dom$', 'react-dom/profiling'), chain.resolve.alias.set('scheduler/tracing', 'scheduler/tracing-profiling'));
|
|
83
68
|
});
|
|
84
69
|
}
|
|
85
|
-
|
|
86
|
-
api.modifyBundlerChain((chain, { environment, isProd })=>{
|
|
87
|
-
let { config } = environment;
|
|
88
|
-
if (!((config)=>{
|
|
89
|
-
let { performance, splitChunks } = config;
|
|
90
|
-
return performance.chunkSplit ? performance.chunkSplit?.strategy === 'split-by-experience' : 'object' == typeof splitChunks && (!splitChunks.preset || 'default' === splitChunks.preset);
|
|
91
|
-
})(config) || 'web' !== config.output.target || !1 === options) return;
|
|
92
|
-
let normalizedOptions = !0 === options ? {
|
|
93
|
-
react: !0,
|
|
94
|
-
router: !0
|
|
95
|
-
} : options, currentConfig = chain.optimization.splitChunks.values();
|
|
96
|
-
if ('object' != typeof currentConfig) return;
|
|
97
|
-
let extraGroups = {};
|
|
98
|
-
normalizedOptions.react && (extraGroups.react = {
|
|
99
|
-
name: 'lib-react',
|
|
100
|
-
test: isProd ? /node_modules[\\/](?:react|react-dom|scheduler)[\\/]/ : /node_modules[\\/](?:react|react-dom|scheduler|react-refresh|@rspack[\\/]plugin-react-refresh)[\\/]/,
|
|
101
|
-
priority: 0
|
|
102
|
-
}), normalizedOptions.router && (extraGroups.router = {
|
|
103
|
-
name: 'lib-router',
|
|
104
|
-
test: /node_modules[\\/](?:react-router|react-router-dom|history|@remix-run[\\/]router)[\\/]/,
|
|
105
|
-
priority: 0
|
|
106
|
-
}), Object.keys(extraGroups).length && chain.optimization.splitChunks({
|
|
107
|
-
...currentConfig,
|
|
108
|
-
cacheGroups: {
|
|
109
|
-
...extraGroups,
|
|
110
|
-
...currentConfig.cacheGroups
|
|
111
|
-
}
|
|
112
|
-
});
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
let PLUGIN_REACT_NAME = 'rsbuild:react', pluginReact = (options = {})=>({
|
|
70
|
+
let pluginReact = (options = {})=>({
|
|
116
71
|
name: PLUGIN_REACT_NAME,
|
|
117
72
|
setup (api) {
|
|
73
|
+
assertCoreVersion(api.context.version);
|
|
118
74
|
let finalOptions = {
|
|
119
75
|
fastRefresh: !0,
|
|
120
76
|
splitChunks: !0,
|
|
121
77
|
enableProfiler: !1,
|
|
122
78
|
...options
|
|
123
|
-
};
|
|
124
|
-
|
|
79
|
+
}, reactRefreshPath = finalOptions.fastRefresh ? src_require.resolve('react-refresh') : '';
|
|
80
|
+
api.modifyEnvironmentConfig((config, { mergeEnvironmentConfig })=>{
|
|
81
|
+
let isDev = 'development' === config.mode, usingHMR = isDev && config.dev.hmr && 'web' === config.output.target;
|
|
82
|
+
return mergeEnvironmentConfig({
|
|
83
|
+
tools: {
|
|
84
|
+
swc: {
|
|
85
|
+
jsc: {
|
|
86
|
+
transform: {
|
|
87
|
+
react: {
|
|
88
|
+
development: isDev,
|
|
89
|
+
refresh: usingHMR && finalOptions.fastRefresh,
|
|
90
|
+
runtime: 'automatic',
|
|
91
|
+
...finalOptions.swcReactOptions
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}, config);
|
|
98
|
+
}), finalOptions.swcReactOptions?.runtime === 'preserve' && api.modifyBundlerChain((chain)=>{
|
|
99
|
+
chain.module.parser.merge({
|
|
100
|
+
javascript: {
|
|
101
|
+
jsx: !0
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
}), api.modifyBundlerChain(async (chain, { CHAIN_ID, environment, isDev, target })=>{
|
|
105
|
+
let { config } = environment;
|
|
106
|
+
if (!(isDev && config.dev.hmr && 'web' === target) || !finalOptions.fastRefresh) return;
|
|
107
|
+
chain.resolve.alias.set('react-refresh', node_path.dirname(reactRefreshPath));
|
|
108
|
+
let { ReactRefreshRspackPlugin } = await import("@rspack/plugin-react-refresh"), jsRule = chain.module.rules.get(CHAIN_ID.RULE.JS);
|
|
109
|
+
chain.plugin(CHAIN_ID.PLUGIN.REACT_FAST_REFRESH).use(ReactRefreshRspackPlugin, [
|
|
110
|
+
{
|
|
111
|
+
test: jsRule.get('test'),
|
|
112
|
+
include: jsRule.include.values(),
|
|
113
|
+
exclude: jsRule.exclude.values(),
|
|
114
|
+
resourceQuery: {
|
|
115
|
+
not: /^\?raw$/
|
|
116
|
+
},
|
|
117
|
+
...finalOptions.reactRefreshOptions
|
|
118
|
+
}
|
|
119
|
+
]);
|
|
120
|
+
}), applySplitChunksRule(api, finalOptions.splitChunks), finalOptions.enableProfiler && applyReactProfiler(api);
|
|
125
121
|
}
|
|
126
122
|
});
|
|
127
123
|
export { PLUGIN_REACT_NAME, pluginReact };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/plugin-react",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-rc.2",
|
|
4
4
|
"description": "React plugin for Rsbuild",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -12,29 +12,27 @@
|
|
|
12
12
|
"exports": {
|
|
13
13
|
".": {
|
|
14
14
|
"types": "./dist/index.d.ts",
|
|
15
|
-
"
|
|
16
|
-
"require": "./dist/index.cjs"
|
|
15
|
+
"default": "./dist/index.js"
|
|
17
16
|
}
|
|
18
17
|
},
|
|
19
|
-
"main": "./dist/index.cjs",
|
|
20
18
|
"types": "./dist/index.d.ts",
|
|
21
19
|
"files": [
|
|
22
20
|
"dist"
|
|
23
21
|
],
|
|
24
22
|
"dependencies": {
|
|
25
|
-
"@rspack/plugin-react-refresh": "
|
|
23
|
+
"@rspack/plugin-react-refresh": "2.0.0",
|
|
26
24
|
"react-refresh": "^0.18.0"
|
|
27
25
|
},
|
|
28
26
|
"devDependencies": {
|
|
29
|
-
"@rsbuild/core-v1": "npm:@rsbuild/core@^1.7.
|
|
30
|
-
"@rslib/core": "0.
|
|
31
|
-
"@types/node": "^24.12.
|
|
32
|
-
"typescript": "^
|
|
33
|
-
"@rsbuild/core": "2.0.0-
|
|
27
|
+
"@rsbuild/core-v1": "npm:@rsbuild/core@^1.7.5",
|
|
28
|
+
"@rslib/core": "0.21.0",
|
|
29
|
+
"@types/node": "^24.12.2",
|
|
30
|
+
"typescript": "^6.0.2",
|
|
31
|
+
"@rsbuild/core": "2.0.0-rc.1",
|
|
34
32
|
"@scripts/test-helper": "1.0.0"
|
|
35
33
|
},
|
|
36
34
|
"peerDependencies": {
|
|
37
|
-
"@rsbuild/core": "^
|
|
35
|
+
"@rsbuild/core": "^2.0.0-0"
|
|
38
36
|
},
|
|
39
37
|
"peerDependenciesMeta": {
|
|
40
38
|
"@rsbuild/core": {
|
|
@@ -46,8 +44,7 @@
|
|
|
46
44
|
"registry": "https://registry.npmjs.org/"
|
|
47
45
|
},
|
|
48
46
|
"scripts": {
|
|
49
|
-
"build": "rslib
|
|
50
|
-
"dev": "rslib
|
|
51
|
-
"bump": "pnpx bumpp --no-tag"
|
|
47
|
+
"build": "rslib",
|
|
48
|
+
"dev": "rslib -w"
|
|
52
49
|
}
|
|
53
50
|
}
|
package/dist/index.cjs
DELETED
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const __rslib_import_meta_url__ = "u" < typeof document ? new (require('url'.replace('', ''))).URL('file:' + __filename).href : document.currentScript && document.currentScript.src || new URL('main.js', document.baseURI).href;
|
|
3
|
-
var __webpack_require__ = {};
|
|
4
|
-
__webpack_require__.n = (module)=>{
|
|
5
|
-
var getter = module && module.__esModule ? ()=>module.default : ()=>module;
|
|
6
|
-
return __webpack_require__.d(getter, {
|
|
7
|
-
a: getter
|
|
8
|
-
}), getter;
|
|
9
|
-
}, __webpack_require__.d = (exports1, definition)=>{
|
|
10
|
-
for(var key in definition)__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key) && Object.defineProperty(exports1, key, {
|
|
11
|
-
enumerable: !0,
|
|
12
|
-
get: definition[key]
|
|
13
|
-
});
|
|
14
|
-
}, __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop), __webpack_require__.r = (exports1)=>{
|
|
15
|
-
"u" > typeof Symbol && Symbol.toStringTag && Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
16
|
-
value: 'Module'
|
|
17
|
-
}), Object.defineProperty(exports1, '__esModule', {
|
|
18
|
-
value: !0
|
|
19
|
-
});
|
|
20
|
-
};
|
|
21
|
-
var __webpack_exports__ = {};
|
|
22
|
-
__webpack_require__.r(__webpack_exports__), __webpack_require__.d(__webpack_exports__, {
|
|
23
|
-
PLUGIN_REACT_NAME: ()=>PLUGIN_REACT_NAME,
|
|
24
|
-
pluginReact: ()=>pluginReact
|
|
25
|
-
});
|
|
26
|
-
const external_node_module_namespaceObject = require("node:module"), external_node_path_namespaceObject = require("node:path");
|
|
27
|
-
var external_node_path_default = __webpack_require__.n(external_node_path_namespaceObject);
|
|
28
|
-
const react_require = (0, external_node_module_namespaceObject.createRequire)(__rslib_import_meta_url__);
|
|
29
|
-
function applyBasicReactSupport(api, options) {
|
|
30
|
-
let REACT_REFRESH_PATH = options.fastRefresh ? react_require.resolve('react-refresh') : '';
|
|
31
|
-
api.modifyEnvironmentConfig((config, { mergeEnvironmentConfig })=>{
|
|
32
|
-
let isDev = 'development' === config.mode, usingHMR = isDev && config.dev.hmr && 'web' === config.output.target;
|
|
33
|
-
return mergeEnvironmentConfig({
|
|
34
|
-
tools: {
|
|
35
|
-
swc: {
|
|
36
|
-
jsc: {
|
|
37
|
-
parser: {
|
|
38
|
-
syntax: "typescript",
|
|
39
|
-
tsx: !0
|
|
40
|
-
},
|
|
41
|
-
transform: {
|
|
42
|
-
react: {
|
|
43
|
-
development: isDev,
|
|
44
|
-
refresh: usingHMR && options.fastRefresh,
|
|
45
|
-
runtime: 'automatic',
|
|
46
|
-
...options.swcReactOptions
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}, config);
|
|
53
|
-
}), options.swcReactOptions?.runtime === 'preserve' && api.modifyBundlerChain((chain)=>{
|
|
54
|
-
chain.module.parser.merge({
|
|
55
|
-
javascript: {
|
|
56
|
-
jsx: !0
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
}), api.modifyBundlerChain(async (chain, { CHAIN_ID, environment, isDev, target })=>{
|
|
60
|
-
let { config } = environment;
|
|
61
|
-
if (!(isDev && config.dev.hmr && 'web' === target) || !options.fastRefresh) return;
|
|
62
|
-
chain.resolve.alias.set('react-refresh', external_node_path_default().dirname(REACT_REFRESH_PATH));
|
|
63
|
-
let { ReactRefreshRspackPlugin } = await import("@rspack/plugin-react-refresh"), jsRule = chain.module.rules.get(CHAIN_ID.RULE.JS);
|
|
64
|
-
chain.plugin(CHAIN_ID.PLUGIN.REACT_FAST_REFRESH).use(ReactRefreshRspackPlugin, [
|
|
65
|
-
{
|
|
66
|
-
test: jsRule.get('test'),
|
|
67
|
-
include: jsRule.include.values(),
|
|
68
|
-
exclude: jsRule.exclude.values(),
|
|
69
|
-
resourceQuery: {
|
|
70
|
-
not: /^\?raw$/
|
|
71
|
-
},
|
|
72
|
-
...options.reactRefreshOptions
|
|
73
|
-
}
|
|
74
|
-
]);
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
function applyReactProfiler(api) {
|
|
78
|
-
let hasReactDomClientCache;
|
|
79
|
-
api.modifyEnvironmentConfig((config, { mergeEnvironmentConfig })=>{
|
|
80
|
-
if ('production' === config.mode) return mergeEnvironmentConfig(config, {
|
|
81
|
-
output: {
|
|
82
|
-
minify: {
|
|
83
|
-
jsOptions: {
|
|
84
|
-
minimizerOptions: {
|
|
85
|
-
mangle: {
|
|
86
|
-
keep_classnames: !0,
|
|
87
|
-
keep_fnames: !0
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
});
|
|
94
|
-
}), api.modifyBundlerChain((chain, { isProd })=>{
|
|
95
|
-
isProd && (chain.resolve.alias.set((()=>{
|
|
96
|
-
if (void 0 !== hasReactDomClientCache) return hasReactDomClientCache;
|
|
97
|
-
try {
|
|
98
|
-
react_require.resolve('react-dom/client', {
|
|
99
|
-
paths: [
|
|
100
|
-
api.context.rootPath
|
|
101
|
-
]
|
|
102
|
-
}), hasReactDomClientCache = !0;
|
|
103
|
-
} catch {
|
|
104
|
-
hasReactDomClientCache = !1;
|
|
105
|
-
}
|
|
106
|
-
return hasReactDomClientCache;
|
|
107
|
-
})() ? 'react-dom/client$' : 'react-dom$', 'react-dom/profiling'), chain.resolve.alias.set('scheduler/tracing', 'scheduler/tracing-profiling'));
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
const isDefaultPreset = (config)=>{
|
|
111
|
-
let { performance, splitChunks } = config;
|
|
112
|
-
return performance.chunkSplit ? performance.chunkSplit?.strategy === 'split-by-experience' : 'object' == typeof splitChunks && (!splitChunks.preset || 'default' === splitChunks.preset);
|
|
113
|
-
};
|
|
114
|
-
function applySplitChunksRule(api, options) {
|
|
115
|
-
api.modifyBundlerChain((chain, { environment, isProd })=>{
|
|
116
|
-
let { config } = environment;
|
|
117
|
-
if (!isDefaultPreset(config) || 'web' !== config.output.target || !1 === options) return;
|
|
118
|
-
let normalizedOptions = !0 === options ? {
|
|
119
|
-
react: !0,
|
|
120
|
-
router: !0
|
|
121
|
-
} : options, currentConfig = chain.optimization.splitChunks.values();
|
|
122
|
-
if ('object' != typeof currentConfig) return;
|
|
123
|
-
let extraGroups = {};
|
|
124
|
-
normalizedOptions.react && (extraGroups.react = {
|
|
125
|
-
name: 'lib-react',
|
|
126
|
-
test: isProd ? /node_modules[\\/](?:react|react-dom|scheduler)[\\/]/ : /node_modules[\\/](?:react|react-dom|scheduler|react-refresh|@rspack[\\/]plugin-react-refresh)[\\/]/,
|
|
127
|
-
priority: 0
|
|
128
|
-
}), normalizedOptions.router && (extraGroups.router = {
|
|
129
|
-
name: 'lib-router',
|
|
130
|
-
test: /node_modules[\\/](?:react-router|react-router-dom|history|@remix-run[\\/]router)[\\/]/,
|
|
131
|
-
priority: 0
|
|
132
|
-
}), Object.keys(extraGroups).length && chain.optimization.splitChunks({
|
|
133
|
-
...currentConfig,
|
|
134
|
-
cacheGroups: {
|
|
135
|
-
...extraGroups,
|
|
136
|
-
...currentConfig.cacheGroups
|
|
137
|
-
}
|
|
138
|
-
});
|
|
139
|
-
});
|
|
140
|
-
}
|
|
141
|
-
const PLUGIN_REACT_NAME = 'rsbuild:react', pluginReact = (options = {})=>({
|
|
142
|
-
name: PLUGIN_REACT_NAME,
|
|
143
|
-
setup (api) {
|
|
144
|
-
let finalOptions = {
|
|
145
|
-
fastRefresh: !0,
|
|
146
|
-
splitChunks: !0,
|
|
147
|
-
enableProfiler: !1,
|
|
148
|
-
...options
|
|
149
|
-
};
|
|
150
|
-
'rspack' === api.context.bundlerType && (applyBasicReactSupport(api, finalOptions), finalOptions.enableProfiler && applyReactProfiler(api)), applySplitChunksRule(api, finalOptions.splitChunks);
|
|
151
|
-
}
|
|
152
|
-
});
|
|
153
|
-
for(var __rspack_i in exports.PLUGIN_REACT_NAME = __webpack_exports__.PLUGIN_REACT_NAME, exports.pluginReact = __webpack_exports__.pluginReact, __webpack_exports__)-1 === [
|
|
154
|
-
"PLUGIN_REACT_NAME",
|
|
155
|
-
"pluginReact"
|
|
156
|
-
].indexOf(__rspack_i) && (exports[__rspack_i] = __webpack_exports__[__rspack_i]);
|
|
157
|
-
Object.defineProperty(exports, '__esModule', {
|
|
158
|
-
value: !0
|
|
159
|
-
});
|
package/dist/react.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { RsbuildPluginAPI } from '@rsbuild/core';
|
|
2
|
-
import type { PluginReactOptions } from './index.js';
|
|
3
|
-
export declare function applyBasicReactSupport(api: RsbuildPluginAPI, options: PluginReactOptions): void;
|
|
4
|
-
export declare function applyReactProfiler(api: RsbuildPluginAPI): void;
|