phantom-build 0.4.0 → 0.4.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/README.md +18 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -62,6 +62,24 @@ export default {
|
|
|
62
62
|
};
|
|
63
63
|
```
|
|
64
64
|
|
|
65
|
+
### Rsbuild
|
|
66
|
+
|
|
67
|
+
```ts
|
|
68
|
+
// rsbuild.config.ts
|
|
69
|
+
import { defineConfig } from '@rsbuild/core';
|
|
70
|
+
import { pluginReact } from '@rsbuild/plugin-react';
|
|
71
|
+
import phantom from 'phantom-build/rspack';
|
|
72
|
+
|
|
73
|
+
export default defineConfig({
|
|
74
|
+
plugins: [pluginReact()],
|
|
75
|
+
tools: {
|
|
76
|
+
rspack: {
|
|
77
|
+
plugins: [phantom()],
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
});
|
|
81
|
+
```
|
|
82
|
+
|
|
65
83
|
That's it. Run your build and Phantom handles the rest.
|
|
66
84
|
|
|
67
85
|
## How It Works
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "phantom-build",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "Automatic code-splitting for React — extracts event handlers into lazy-loaded chunks and wraps below-fold components in React.lazy + Suspense at build time",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|