fix(#10923): allow direct literal class name
This commit is contained in:
parent
c7babde4a1
commit
843586d468
1 changed files with 1 additions and 0 deletions
|
|
@ -81,6 +81,7 @@ export function unwindCssModuleClassName(ast: estree.Node): void {
|
||||||
const moduleTree = new Map(cssModuleTreeNode.declarations[0].init.properties.flatMap((property) => {
|
const moduleTree = new Map(cssModuleTreeNode.declarations[0].init.properties.flatMap((property) => {
|
||||||
if (property.type !== 'Property') return [];
|
if (property.type !== 'Property') return [];
|
||||||
if (property.key.type !== 'Identifier') 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 [];
|
if (property.value.type !== 'Identifier') return [];
|
||||||
const labelledValue = property.value.name;
|
const labelledValue = property.value.name;
|
||||||
const actualValue = parent.body.find((x) => {
|
const actualValue = parent.body.find((x) => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue