Skip to content

Commit bc84c88

Browse files
authored
fix: handling components without styles for ElementPlusResolver (unplugin#468)
1 parent 88fbdb1 commit bc84c88

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/core/resolvers/element-plus.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,8 @@ function resolveDirective(name: string, options: ElementPlusResolverOptionsResol
145145
}
146146
}
147147

148+
const noStylesComponent = ['ElAutoResizer']
149+
148150
/**
149151
* Resolver for Element Plus
150152
*
@@ -178,7 +180,11 @@ export function ElementPlusResolver(
178180
{
179181
type: 'component',
180182
resolve: async (name: string) => {
181-
return resolveComponent(name, await resolveOptions())
183+
const options = await resolveOptions()
184+
185+
if (noStylesComponent.includes(name))
186+
return resolveComponent(name, { ...options, importStyle: false })
187+
else return resolveComponent(name, options)
182188
},
183189
},
184190
{

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy