unplugin / unplugin-vue-ce

🍒 A vue plugin that extends vue's Custom Element capabilities
MIT License
75 stars 3 forks source link

[BUG] - Seems to be broken with vue 3.5 #147

Open johnwc opened 2 months ago

johnwc commented 2 months ago

Describe the bug

With the latest release of 3.5, there is now an error when building components.

Building for production...C:\App\src\SiteWidget\node_modules\@unplugin-vue-ce\sub-style\index.cjs:110
  if (isApplyStylesIdentifier && isVueElementIdentifier && isBaseClassIdentifier && node.type === "CallExpression" && node.callee.type === "MemberExpression" && node.callee.property.name === "appendChild" && node.callee.object.property.name === "shadowRoot") {

TypeError: Cannot read properties of undefined (reading 'name')
    at injectApiCustomElement (C:\App\src\SiteWidget\node_modules\@unplugin-vue-ce\sub-style\index.cjs:110:237)
    at Object.enter (C:\App\src\SiteWidget\node_modules\@unplugin-vue-ce\sub-style\index.cjs:146:7)
    at d.visit (C:\App\src\SiteWidget\node_modules\estree-walker-ts\index.cjs:1:1360)
    at d.visit (C:\App\src\SiteWidget\node_modules\estree-walker-ts\index.cjs:1:1794)
    at d.visit (C:\App\src\SiteWidget\node_modules\estree-walker-ts\index.cjs:1:1756)
    at d.visit (C:\App\src\SiteWidget\node_modules\estree-walker-ts\index.cjs:1:1794)
    at d.visit (C:\App\src\SiteWidget\node_modules\estree-walker-ts\index.cjs:1:1756)
    at d.visit (C:\App\src\SiteWidget\node_modules\estree-walker-ts\index.cjs:1:1794)
    at x (C:\App\src\SiteWidget\node_modules\estree-walker-ts\index.cjs:1:3444)
    at injectVueRuntime (C:\App\src\SiteWidget\node_modules\@unplugin-vue-ce\sub-style\index.cjs:134:36)

Node.js v21.7.3

Reproduction

No response

System Info

No response

Used Package Manager

npm

Validations

baiwusanyu-c commented 2 months ago

I am glad that Vue 3.5 supports more features of custom elements. This repository should have completed its mission (a transitional solution before Vue supports more features for custom elements), so this repository should not support 3.5.