Skip to content

Commit

Permalink
fix(varlet-ui): fix function component import error (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
haoziqaq authored Jun 29, 2021
1 parent 663b39a commit 1c6db6c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/resolvers/varlet-ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ export const VarletUIResolver = (options: VarletUIResolverOptions = {}): Compone
} = options
if (name.startsWith('Var')) {
const partialName = name.slice(3)
const sideEffects = []
importCss && sideEffects.push(`@varlet/ui/es/${kebabCase(partialName)}/style`)
importLess && sideEffects.push(`@varlet/ui/es/${kebabCase(partialName)}/style/less.js`)

return {
importName: partialName,
importName: `_${partialName}Component`,
path: '@varlet/ui',
sideEffects: importLess
? `@varlet/ui/es/${kebabCase(partialName)}/style/less.js`
: importCss
? `@varlet/ui/es/${kebabCase(partialName)}/style`
: undefined,
sideEffects,
}
}
}

0 comments on commit 1c6db6c

Please sign in to comment.