@rsbuild/plugin-react 0.2.8 → 0.2.9

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.
Files changed (2) hide show
  1. package/dist/index.d.ts +13 -0
  2. package/package.json +4 -4
package/dist/index.d.ts CHANGED
@@ -3,10 +3,23 @@ import { RsbuildPlugin } from '@rsbuild/core';
3
3
  declare const isBeyondReact17: (cwd: string) => Promise<any>;
4
4
 
5
5
  type SplitReactChunkOptions = {
6
+ /**
7
+ * Whether to enable split chunking for React-related dependencies (e.g., react, react-dom, scheduler).
8
+ *
9
+ * @default true
10
+ */
6
11
  react?: boolean;
12
+ /**
13
+ * Whether to enable split chunking for routing-related dependencies (e.g., react-router, react-router-dom, history).
14
+ *
15
+ * @default true
16
+ */
7
17
  router?: boolean;
8
18
  };
9
19
  type PluginReactOptions = {
20
+ /**
21
+ * Configuration for chunk splitting of React-related dependencies.
22
+ */
10
23
  splitChunks?: SplitReactChunkOptions;
11
24
  };
12
25
  declare const pluginReact: (options?: PluginReactOptions) => RsbuildPlugin;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsbuild/plugin-react",
3
- "version": "0.2.8",
3
+ "version": "0.2.9",
4
4
  "description": "React plugin for Rsbuild",
5
5
  "repository": {
6
6
  "type": "git",
@@ -24,13 +24,13 @@
24
24
  "dependencies": {
25
25
  "@rspack/plugin-react-refresh": "0.4.4",
26
26
  "react-refresh": "^0.14.0",
27
- "@rsbuild/shared": "0.2.8"
27
+ "@rsbuild/shared": "0.2.9"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@types/node": "16.x",
31
31
  "typescript": "^5.3.0",
32
- "@rsbuild/test-helper": "0.2.8",
33
- "@rsbuild/core": "0.2.8"
32
+ "@rsbuild/core": "0.2.9",
33
+ "@rsbuild/test-helper": "0.2.9"
34
34
  },
35
35
  "publishConfig": {
36
36
  "access": "public",