From 5d533b1187e0260a1b58dbc35b17f8676afb99f3 Mon Sep 17 00:00:00 2001 From: Johnson1z Date: Wed, 1 May 2024 14:38:34 +0800 Subject: [PATCH] feat(ant-design-vue): support `css-in-js` import style (#703) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Anthony Fu Co-authored-by: 黄启浩 Co-authored-by: JohnsonHuang --- src/core/resolvers/antdv.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/resolvers/antdv.ts b/src/core/resolvers/antdv.ts index 6302bc2e..33d9041d 100644 --- a/src/core/resolvers/antdv.ts +++ b/src/core/resolvers/antdv.ts @@ -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 * @@ -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` }