Skip to content

Commit 38b8d24

Browse files
authored
fix(rsbuild-plugin): add source.include in prod mode only (#3971)
1 parent b621893 commit 38b8d24

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.changeset/shiny-gorillas-tap.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@module-federation/rsbuild-plugin': patch
3+
---
4+
5+
fix(rsbuild-plugin): use detail source.include instead of range regexp

packages/rsbuild-plugin/src/cli/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,10 @@ export const pluginModuleFederation = (
232232
// adding to include and let SWC transform it
233233
config.source.include = [
234234
...(config.source.include || []),
235-
/@module-federation[\\/]/,
235+
/@module-federation\/webpack-bundler-runtime/,
236+
/@module-federation\/runtime/,
237+
/@module-federation\/runtime-core/,
238+
/@module-federation\/sdk/,
236239
];
237240

238241
return config;

0 commit comments

Comments
 (0)