Vue Custom Element in Typescript Error
See original GitHub issueWhen attempting to call Vue.use(VueCustomElement), the compiler throws an error:
__WEBPACK_IMPORTED_MODULE_0_vue__.default.customElement is not a function
Opening up the index.d.ts file and adding:
static default:any
to the class, then calling:
Vue.use(VueCustomElement.default)
appears to fix this error, though I’m not sure if this is the correct way of going about doing this.
@isaaclyman Is it possible to see an example of the correct implementation of custom elements in Typescript?
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
How use vue-custom-element with Vue+Typescript
I'm using vue-custom-element to create my custom element, but I created a vue project with typescript and when trying to assign the store...
Read more >Got “Unknown custom element” while rendering using vue ...
@Kokodoko What I want to do is to import all components in one single file (components/index.ts) and export them again so I can...
Read more >Angular elements overview
Angular elements are Angular components packaged as custom elements (also called Web Components), a web standard for defining new HTML elements in a ......
Read more >How to use Vue 3 with TypeScript - LogRocket Blog
In this article, we've covered all the basic information you need to create a Vue application completely in TypeScript with custom decorator ...
Read more >@vitejs/plugin-vue - npm
Using Vue SFCs as Custom Elements · { customElement: true } will import all *.vue files in custom element mode. · Use a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@thedaruma The latest release should resolve this issue, if you’re still seeing it. Sorry about the delay.
Thank you for your work on this. I am able to move forward. Really appreciate it!