We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b7d8bb7 commit e6e3fe4Copy full SHA for e6e3fe4
src/core/resolvers/arco.ts
@@ -143,6 +143,12 @@ export interface ArcoResolverOptions {
143
* @default false
144
*/
145
resolveIcons?: boolean
146
+ /**
147
+ * Control style automatic import
148
+ *
149
+ * @default true
150
+ */
151
+ sideEffect?: boolean
152
}
153
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',
- sideEffects: getComponentStyleDir(importName, importStyle),
182
183
+ if (options.sideEffect !== false) {
184
+ (config as any).sideEffects = getComponentStyleDir(importName, importStyle)
185
+ }
186
+ return config
187
188
},
189
0 commit comments