File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -143,6 +143,12 @@ export interface ArcoResolverOptions {
143
143
* @default false
144
144
*/
145
145
resolveIcons ?: boolean
146
+ /**
147
+ * Control style automatic import
148
+ *
149
+ * @default true
150
+ */
151
+ sideEffect ?: boolean
146
152
}
147
153
148
154
/**
@@ -170,11 +176,14 @@ export function ArcoResolver(
170
176
const importStyle = options . importStyle ?? 'css'
171
177
172
178
const importName = name . slice ( 1 )
173
- return {
179
+ const config = {
174
180
importName,
175
181
path : '@arco-design/web-vue' ,
176
- sideEffects : getComponentStyleDir ( importName , importStyle ) ,
177
182
}
183
+ if ( options . sideEffect !== false ) {
184
+ ( config as any ) . sideEffects = getComponentStyleDir ( importName , importStyle )
185
+ }
186
+ return config
178
187
}
179
188
} ,
180
189
}
You can’t perform that action at this time.
0 commit comments