2

I have an error when using vue-property-decorator in my additional library. _790

From this stackoverflow answer. Vue is being loaded/packed into the bundle by webpack and also loaded externally (not via webpack) https://stackoverflow.com/a/50932919/5988531

I do something like this in my main.ts:

import MyIcon from '<my-external-library>/src/components/icon/icon.vue';
Vue.component('my-icon', MyIcon);

Then, I use my-icon in the project and got an error.

Do you have any comments or suggestions for this?

P.S. I think this is because We need to extend Vue class in *.vue file. Can I use property decorators without extending a Vue instance?

Mgorunuch
  • 647
  • 1
  • 5
  • 16

0 Answers0