Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita9a759d

Browse files
committed
Refactor rspack configuration in autoImport feature to streamline plugin appending process and ensure previous configurations are preserved.
1 parent821298c commita9a759d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

‎src/features/autoImport/autoImport.ts‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,25 +82,25 @@ export default (api: IApi) => {
8282
// Rsbuild 集成 (基于 Rspack)
8383
api.modifyRsbuildConfig((config:any)=>{
8484
config.tools=config.tools||{};
85-
85+
8686
// 保存之前的配置函数
8787
constprevRspack=config.tools.rspack;
88-
88+
8989
config.tools.rspack=(rspackConfig:any,context:any)=>{
9090
// 先执行之前的配置(如果存在)
9191
letresultConfig=rspackConfig;
9292
if(typeofprevRspack==='function'){
9393
resultConfig=prevRspack(rspackConfig,context);
9494
}
95-
95+
9696
// 使用 appendPlugins 添加插件
9797
if(context&&context.appendPlugins){
9898
context.appendPlugins(AutoImportRspack(getAutoImportConfig()));
9999
}
100-
100+
101101
returnresultConfig;
102102
};
103-
103+
104104
returnconfig;
105105
});
106106
};

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp