Skip to content

Commit

Permalink
feat(ant-design-vue): support css-in-js import style (#703)
Browse files Browse the repository at this point in the history
Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
Co-authored-by: 黄启浩 <huangqh@xianghe.com>
Co-authored-by: JohnsonHuang <huangqihao@xh-online.com>
  • Loading branch information
4 people committed May 1, 2024
1 parent ecf1a68 commit 5d533b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/resolvers/antdv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ export interface AntDesignVueResolverOptions {
*
* @default 'css'
*/
importStyle?: boolean | 'css' | 'less'
importStyle?: boolean | 'css' | 'less' | 'css-in-js'
/**
* resolve `ant-design-vue' icons
*
Expand Down Expand Up @@ -288,7 +288,7 @@ function getSideEffects(compName: string, options: AntDesignVueResolverOptions):
const lib = options.cjs ? 'lib' : 'es'
const packageName = options?.packageName || 'ant-design-vue'

if (importStyle === 'less' || importLess) {
if (importStyle === 'less' || importStyle === 'css-in-js' || importLess) {
const styleDir = getStyleDir(compName)
return `${packageName}/${lib}/${styleDir}/style`
}
Expand Down

0 comments on commit 5d533b1

Please sign in to comment.