@plumeria/webpack-plugin 0.23.2 → 0.24.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -116,10 +116,13 @@ function collectLocalConsts(ast) {
|
|
|
116
116
|
(0, core_1.traverse)(ast, {
|
|
117
117
|
VariableDeclarator(path) {
|
|
118
118
|
const { node } = path;
|
|
119
|
-
if (t.isIdentifier(node.id) &&
|
|
120
|
-
node.init
|
|
121
|
-
|
|
122
|
-
|
|
119
|
+
if (t.isIdentifier(node.id) && node.init) {
|
|
120
|
+
if (t.isStringLiteral(node.init)) {
|
|
121
|
+
localConsts[node.id.name] = node.init.value;
|
|
122
|
+
}
|
|
123
|
+
else if (t.isObjectExpression(node.init)) {
|
|
124
|
+
localConsts[node.id.name] = objectExpressionToObject(node.init, localConsts, keyframesHashTable, viewTransitionHashTable, tokensTable);
|
|
125
|
+
}
|
|
123
126
|
}
|
|
124
127
|
},
|
|
125
128
|
});
|
|
@@ -263,10 +266,6 @@ function resolveConstTableMemberExpression(node, constTable) {
|
|
|
263
266
|
return undefined;
|
|
264
267
|
}
|
|
265
268
|
function resolveTokensTableMemberExpressionByNode(node, tokensTable) {
|
|
266
|
-
if (t.isIdentifier(node)) {
|
|
267
|
-
const cssVarName = (0, zss_engine_1.camelToKebabCase)(node.name);
|
|
268
|
-
return `var(--${cssVarName})`;
|
|
269
|
-
}
|
|
270
269
|
if (t.isMemberExpression(node) && t.isIdentifier(node.object)) {
|
|
271
270
|
const varName = node.object.name;
|
|
272
271
|
let key;
|