Commit 8ea102e 1 parent d65cf0f commit 8ea102e Copy full SHA for 8ea102e
File tree 2 files changed +9
-2
lines changed
2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,12 @@ export type ToolsHtmlPluginConfig = ConfigChainWithContext<
76
76
}
77
77
> ;
78
78
79
+ // equivalent to import('webpack-merge').merge
80
+ export type WebpackMerge = < Configuration extends object > (
81
+ firstConfiguration : Configuration | Configuration [ ] ,
82
+ ...configurations : Configuration [ ]
83
+ ) => Configuration ;
84
+
79
85
export type ModifyRspackConfigUtils = ModifyChainUtils & {
80
86
addRules : ( rules : RspackRule | RspackRule [ ] ) => void ;
81
87
appendRules : ( rules : RspackRule | RspackRule [ ] ) => void ;
@@ -86,7 +92,7 @@ export type ModifyRspackConfigUtils = ModifyChainUtils & {
86
92
plugins : BundlerPluginInstance | BundlerPluginInstance [ ] ,
87
93
) => void ;
88
94
removePlugin : ( pluginName : string ) => void ;
89
- mergeConfig : typeof import ( 'webpack-merge' ) . merge ;
95
+ mergeConfig : WebpackMerge ;
90
96
rspack : typeof rspack ;
91
97
} ;
92
98
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import type {
10
10
NormalizedConfig ,
11
11
NormalizedEnvironmentConfig ,
12
12
RsbuildConfig ,
13
+ WebpackMerge ,
13
14
} from './config' ;
14
15
import type { RsbuildContext } from './context' ;
15
16
import type {
@@ -159,7 +160,7 @@ export type ModifyWebpackConfigUtils = ModifyWebpackChainUtils & {
159
160
plugins : WebpackPluginInstance | WebpackPluginInstance [ ] ,
160
161
) => void ;
161
162
removePlugin : ( pluginName : string ) => void ;
162
- mergeConfig : typeof import ( 'webpack-merge' ) . merge ;
163
+ mergeConfig : WebpackMerge ;
163
164
} ;
164
165
165
166
export type ModifyWebpackChainFn = (
You can’t perform that action at this time.
0 commit comments