@rsbuild/plugin-react 0.7.0-beta.0 → 0.7.0-beta.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.d.ts CHANGED
@@ -1,6 +1,7 @@
1
- import type { RsbuildPlugin, Rspack } from '@rsbuild/core';
2
- import type { PluginOptions as ReactRefreshOptions } from '@rspack/plugin-react-refresh';
3
- export type SplitReactChunkOptions = {
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
- export type PluginReactOptions = {
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?: ReactRefreshOptions;
37
+ reactRefreshOptions?: PluginOptions;
37
38
  };
38
- export declare const PLUGIN_REACT_NAME = "rsbuild:react";
39
- export declare const pluginReact: ({ enableProfiler, ...options }?: PluginReactOptions) => RsbuildPlugin;
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.0",
3
+ "version": "0.7.0-beta.2",
4
4
  "description": "React plugin for Rsbuild",
5
5
  "repository": {
6
6
  "type": "git",
@@ -22,18 +22,18 @@
22
22
  "dist"
23
23
  ],
24
24
  "dependencies": {
25
- "@rspack/plugin-react-refresh": "0.6.5",
25
+ "@rspack/plugin-react-refresh": "0.6.5-canary-2456d69-20240515093621",
26
26
  "react-refresh": "^0.14.2",
27
- "@rsbuild/shared": "0.7.0-beta.0"
27
+ "@rsbuild/shared": "0.7.0-beta.2"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@types/node": "18.x",
31
31
  "typescript": "^5.4.2",
32
- "@rsbuild/core": "0.7.0-beta.0",
33
- "@scripts/test-helper": "0.7.0-beta.0"
32
+ "@rsbuild/core": "0.7.0-beta.2",
33
+ "@scripts/test-helper": "0.7.0-beta.2"
34
34
  },
35
35
  "peerDependencies": {
36
- "@rsbuild/core": "^0.7.0-beta.0"
36
+ "@rsbuild/core": "^0.7.0-beta.2"
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;
@@ -1,3 +0,0 @@
1
- import type { RsbuildPluginAPI } from '@rsbuild/core';
2
- import type { SplitReactChunkOptions } from '.';
3
- export declare const applySplitChunksRule: (api: RsbuildPluginAPI, options?: SplitReactChunkOptions) => void;