File tree Expand file tree Collapse file tree 3 files changed +8
-7
lines changed Expand file tree Collapse file tree 3 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ import { PackageManagerTabs } from '@theme';
2929
3030Then register the plugin in the ` rslib.config.ts ` file:
3131
32- ``` ts title=' rslib.config.ts'
32+ ``` ts title=" rslib.config.ts" twoslash
3333import { pluginModuleFederation } from ' @module-federation/rsbuild-plugin' ;
3434import { pluginReact } from ' @rsbuild/plugin-react' ;
3535import { defineConfig } from ' @rslib/core' ;
@@ -118,7 +118,7 @@ with Hot Module Replacement (HMR).
118118Set up the host app to consume the Rslib Module Federation library. Check out the [ @module-federation/rsbuild-plugin
119119] ( https://www.npmjs.com/package/@module-federation/rsbuild-plugin ) for more information.
120120
121- ``` ts title="rsbuild.config.ts"
121+ ``` ts title="rsbuild.config.ts" twoslash
122122import { pluginModuleFederation } from ' @module-federation/rsbuild-plugin' ;
123123import { defineConfig } from ' @rsbuild/core' ;
124124import { pluginReact } from ' @rsbuild/plugin-react' ;
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ import { PackageManagerTabs } from '@theme';
2929
3030然后在 ` rslib.config.ts ` 中注册插件:
3131
32- ``` ts title=' rslib.config.ts'
32+ ``` ts title=" rslib.config.ts" twoslash
3333import { pluginModuleFederation } from ' @module-federation/rsbuild-plugin' ;
3434import { pluginReact } from ' @rsbuild/plugin-react' ;
3535import { defineConfig } from ' @rslib/core' ;
@@ -114,10 +114,9 @@ Rslib 支持宿主应用和 Rslib 模块联邦项目同时开发。
114114
115115#### 2. 启动宿主应用
116116
117- 设置宿主应用消费 Rslib 的模块联邦库。查看[ @module-federation/rsbuild-plugin
118- ] ( https://www.npmjs.com/package/@module-federation/rsbuild-plugin ) 获取更多信息。
117+ 设置宿主应用消费 Rslib 的模块联邦库。查看 [ @module-federation/rsbuild-plugin ] ( https://www.npmjs.com/package/@module-federation/rsbuild-plugin ) 获取更多信息。
119118
120- ``` ts title="rsbuild.config.ts"
119+ ``` ts title="rsbuild.config.ts" twoslash
121120import { pluginModuleFederation } from ' @module-federation/rsbuild-plugin' ;
122121import { defineConfig } from ' @rsbuild/core' ;
123122import { pluginReact } from ' @rsbuild/plugin-react' ;
Original file line number Diff line number Diff line change @@ -39,7 +39,9 @@ export default defineConfig({
3939 pluginAlgolia ( ) ,
4040 pluginFontOpenSans ( ) ,
4141 pluginLlms ( ) ,
42- pluginTwoslash ( ) ,
42+ pluginTwoslash ( {
43+ cache : false ,
44+ } ) ,
4345 pluginRss ( {
4446 siteUrl,
4547 feed : [
You can’t perform that action at this time.
0 commit comments