@wevu/compiler 0.0.2 → 0.0.3

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.
Files changed (2) hide show
  1. package/dist/index.mjs +5 -0
  2. package/package.json +6 -6
package/dist/index.mjs CHANGED
@@ -4174,6 +4174,10 @@ function vueSfcTransformPlugin() {
4174
4174
  function isDefineComponentCall(node, aliases) {
4175
4175
  return t.isIdentifier(node.callee) && aliases.has(node.callee.name);
4176
4176
  }
4177
+ function isObjectAssignCall(node) {
4178
+ const callee = node.callee;
4179
+ return t.isMemberExpression(callee) && t.isIdentifier(callee.object, { name: "Object" }) && t.isIdentifier(callee.property, { name: "assign" });
4180
+ }
4177
4181
  function unwrapDefineComponent(node, aliases) {
4178
4182
  if (t.isCallExpression(node) && isDefineComponentCall(node, aliases)) {
4179
4183
  const arg = node.arguments[0];
@@ -4193,6 +4197,7 @@ function resolveComponentExpression(declaration, defineComponentDecls, aliases)
4193
4197
  }
4194
4198
  return null;
4195
4199
  }
4200
+ if (t.isCallExpression(declaration) && isObjectAssignCall(declaration)) return declaration;
4196
4201
  if (t.isIdentifier(declaration)) {
4197
4202
  const matched = defineComponentDecls.get(declaration.name);
4198
4203
  return matched ? t.cloneNode(matched, true) : null;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wevu/compiler",
3
3
  "type": "module",
4
- "version": "0.0.2",
4
+ "version": "0.0.3",
5
5
  "description": "wevu 编译器基础包,面向小程序模板的编译与转换",
6
6
  "author": "ice breaker <1324318532@qq.com>",
7
7
  "license": "MIT",
@@ -41,10 +41,10 @@
41
41
  "dist"
42
42
  ],
43
43
  "dependencies": {
44
- "@babel/generator": "^7.28.6",
45
- "@babel/parser": "^7.28.6",
46
- "@babel/traverse": "^7.28.6",
47
- "@babel/types": "^7.28.6",
44
+ "@babel/generator": "^7.29.0",
45
+ "@babel/parser": "^7.29.0",
46
+ "@babel/traverse": "^7.29.0",
47
+ "@babel/types": "^7.29.0",
48
48
  "@vue/compiler-core": "^3.5.27",
49
49
  "comment-json": "^4.5.1",
50
50
  "fs-extra": "^11.3.3",
@@ -54,7 +54,7 @@
54
54
  "pathe": "^2.0.3",
55
55
  "vue": "^3.5.27",
56
56
  "@weapp-core/shared": "3.0.0",
57
- "rolldown-require": "2.0.2"
57
+ "rolldown-require": "2.0.3"
58
58
  },
59
59
  "publishConfig": {
60
60
  "access": "public",