From 843586d468db0d817da9366e972bbf3920bf7229 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Acid=20Chicken=20=28=E7=A1=AB=E9=85=B8=E9=B6=8F=29?= Date: Wed, 31 May 2023 20:56:04 +0900 Subject: [PATCH] fix(#10923): allow direct literal class name --- .../frontend/lib/rollup-plugin-unwind-css-module-class-name.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/frontend/lib/rollup-plugin-unwind-css-module-class-name.ts b/packages/frontend/lib/rollup-plugin-unwind-css-module-class-name.ts index f596971476..d783507aea 100644 --- a/packages/frontend/lib/rollup-plugin-unwind-css-module-class-name.ts +++ b/packages/frontend/lib/rollup-plugin-unwind-css-module-class-name.ts @@ -81,6 +81,7 @@ export function unwindCssModuleClassName(ast: estree.Node): void { const moduleTree = new Map(cssModuleTreeNode.declarations[0].init.properties.flatMap((property) => { if (property.type !== 'Property') return []; if (property.key.type !== 'Identifier') return []; + if (property.value.type === 'Literal') return [[property.key.name, property.value.value as string]]; if (property.value.type !== 'Identifier') return []; const labelledValue = property.value.name; const actualValue = parent.body.find((x) => {