react-cosmos-plugin-rspack 0.0.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 +40 -0
- package/cosmos.plugin.json +5 -0
- package/dist/client/errorOverlay/reactErrorOverlay.js +1476 -0
- package/dist/client/index.js +3839 -0
- package/dist/client/reactDevtoolsHook.js +8 -0
- package/dist/client/userImports.js +13 -0
- package/dist/server/rspackServerPlugin.js +691 -0
- package/dist/server/userImportsLoader.cjs +32 -0
- package/dist/ui/build.js +55 -0
- package/package.json +57 -0
package/README.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# React Cosmos `rspack` plugin
|
|
2
|
+
|
|
3
|
+
Allows building / running React Cosmos using
|
|
4
|
+
[`rspack`](https://www.rspack.dev/).
|
|
5
|
+
|
|
6
|
+
## Installation
|
|
7
|
+
|
|
8
|
+
Install the package:
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
npm install -D react-cosmos-plugin-rspack
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Add the plugin to your `cosmos.config.json`, e.g.:
|
|
15
|
+
|
|
16
|
+
```diff
|
|
17
|
+
{
|
|
18
|
+
"$schema": "http://json.schemastore.org/cosmos-config",
|
|
19
|
+
+ "plugins": ["react-cosmos-plugin-rspack"],
|
|
20
|
+
"dom": {
|
|
21
|
+
"containerQuerySelector": "#container"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Developing
|
|
27
|
+
|
|
28
|
+
The easiest way to develop is using [`yalc`](https://github.com/wclr/yalc).
|
|
29
|
+
|
|
30
|
+
Install it globally and then from this repo do:
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
yalc publish
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Then in your project that is using React Cosmos run:
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
yalc add react-cosmos-plugin-rspack
|
|
40
|
+
```
|