@plumeria/webpack-plugin 0.23.1 → 0.24.0

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
- t.isStringLiteral(node.init)) {
122
- localConsts[node.id.name] = node.init.value;
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plumeria/webpack-plugin",
3
- "version": "0.23.1",
3
+ "version": "0.24.0",
4
4
  "description": "Plumeria Webpack plugin",
5
5
  "repository": {
6
6
  "type": "git",