@rsbuild/plugin-react 0.7.0-beta.0 → 0.7.0-beta.1
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.d.ts +10 -7
- package/package.json +5 -5
- package/dist/react.d.ts +0 -4
- package/dist/splitChunks.d.ts +0 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import { Rspack, RsbuildPlugin } from '@rsbuild/core';
|
|
2
|
+
import { PluginOptions } from '@rspack/plugin-react-refresh';
|
|
3
|
+
|
|
4
|
+
type SplitReactChunkOptions = {
|
|
4
5
|
/**
|
|
5
6
|
* Whether to enable split chunking for React-related dependencies (e.g., react, react-dom, scheduler).
|
|
6
7
|
*
|
|
@@ -14,7 +15,7 @@ export type SplitReactChunkOptions = {
|
|
|
14
15
|
*/
|
|
15
16
|
router?: boolean;
|
|
16
17
|
};
|
|
17
|
-
|
|
18
|
+
type PluginReactOptions = {
|
|
18
19
|
/**
|
|
19
20
|
* Configure the behavior of SWC to transform React code,
|
|
20
21
|
* the same as SWC's [jsc.transform.react](https://swc.rs/docs/configuration/compilation#jsctransformreact).
|
|
@@ -33,7 +34,9 @@ export type PluginReactOptions = {
|
|
|
33
34
|
* Options passed to `@rspack/plugin-react-refresh`
|
|
34
35
|
* @see https://rspack.dev/guide/tech/react#rspackplugin-react-refresh
|
|
35
36
|
*/
|
|
36
|
-
reactRefreshOptions?:
|
|
37
|
+
reactRefreshOptions?: PluginOptions;
|
|
37
38
|
};
|
|
38
|
-
|
|
39
|
-
|
|
39
|
+
declare const PLUGIN_REACT_NAME = "rsbuild:react";
|
|
40
|
+
declare const pluginReact: ({ enableProfiler, ...options }?: PluginReactOptions) => RsbuildPlugin;
|
|
41
|
+
|
|
42
|
+
export { PLUGIN_REACT_NAME, type PluginReactOptions, type SplitReactChunkOptions, pluginReact };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/plugin-react",
|
|
3
|
-
"version": "0.7.0-beta.
|
|
3
|
+
"version": "0.7.0-beta.1",
|
|
4
4
|
"description": "React plugin for Rsbuild",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -24,16 +24,16 @@
|
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@rspack/plugin-react-refresh": "0.6.5",
|
|
26
26
|
"react-refresh": "^0.14.2",
|
|
27
|
-
"@rsbuild/shared": "0.7.0-beta.
|
|
27
|
+
"@rsbuild/shared": "0.7.0-beta.1"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@types/node": "18.x",
|
|
31
31
|
"typescript": "^5.4.2",
|
|
32
|
-
"@rsbuild/core": "0.7.0-beta.
|
|
33
|
-
"@scripts/test-helper": "0.7.0-beta.
|
|
32
|
+
"@rsbuild/core": "0.7.0-beta.1",
|
|
33
|
+
"@scripts/test-helper": "0.7.0-beta.1"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@rsbuild/core": "^0.7.0-beta.
|
|
36
|
+
"@rsbuild/core": "^0.7.0-beta.1"
|
|
37
37
|
},
|
|
38
38
|
"publishConfig": {
|
|
39
39
|
"access": "public",
|
package/dist/react.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { RsbuildPluginAPI } from '@rsbuild/core';
|
|
2
|
-
import type { PluginReactOptions } from '.';
|
|
3
|
-
export declare const applyBasicReactSupport: (api: RsbuildPluginAPI, options: PluginReactOptions) => void;
|
|
4
|
-
export declare const applyReactProfiler: (api: RsbuildPluginAPI) => void;
|
package/dist/splitChunks.d.ts
DELETED