Skip to content

Commit b07ceed

Browse files
committed
docs: add dev command into doc
1 parent 9716aa6 commit b07ceed

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

website/docs/en/guide/advanced/module-federation.mdx

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ export default config;
154154
### 3. Start writing stories
155155

156156
```ts title="stories/index.stories.tsx" {1-2}
157+
import React from 'react';
157158
// Load your remote module here, Storybook will act as the host app.
158159
import { Counter } from 'rslib-module';
159160

@@ -181,7 +182,20 @@ export const Primary = {};
181182
}
182183
```
183184

184-
### 5. Start Storybook app
185+
### 5. Add Rslib `mf dev` command
186+
187+
```json title="package.json"
188+
{
189+
// ...
190+
"scripts": {
191+
"dev": "rslib mf dev"
192+
}
193+
}
194+
```
195+
196+
And run `npm run dev` to start Module Federation development mode
197+
198+
### 6. Start Storybook app
185199

186200
There you go, start Storybook with `npx storybook dev`.
187201

0 commit comments

Comments
 (0)