We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cb8f932 commit f6da6afCopy full SHA for f6da6af
src/core/resolvers/element-ui.ts
@@ -11,6 +11,11 @@ export interface ElementUiResolverOptions {
11
* @default 'css'
12
*/
13
importStyle?: boolean | 'css' | 'sass'
14
+
15
+ /**
16
+ * exclude component name, if match do not resolve the name
17
+ */
18
+ exclude?: RegExp
19
}
20
21
function getSideEffects(
@@ -46,6 +51,8 @@ export function ElementUiResolver(options: ElementUiResolverOptions = {}): Compo
46
51
return {
47
52
type: 'component',
48
53
resolve: (name: string) => {
54
+ if (options.exclude && name.match(options.exclude))
55
+ return
49
56
if (/^El[A-Z]/.test(name)) {
50
57
const compName = name.slice(2)
58
const partialName = kebabCase(compName)
0 commit comments