Hello,
I am migrating Vue2 application from Webpack to Vite and I am facing errors in production boundle. Build finish with no errors, but when I run it in Chrome, all inherited functionality from parent component do not work.
For example I have Vue.directive('dataTestAttr', dataTestAttr) and when I build component without property-decoration this directive works as it should, but when I use property-decoration I get Failed to resolve directive: data-test-attr error, same thing happens when I try to extend another component instead of Vue, all inherited methods doesnt work and I get Error in v-on handler: "TypeError: e.myMethod is not a function" ...
Am I doing something wrong or is there a known problem with the vite / rollup? Thank you!
Try removing the property-decorator package from the external option. I have a similar setup and it works fine, except that I keep the decorator in the build.
Hello, I am migrating Vue2 application from Webpack to Vite and I am facing errors in production boundle. Build finish with no errors, but when I run it in Chrome, all inherited functionality from parent component do not work.
For example I have
Vue.directive('dataTestAttr', dataTestAttr)
and when I build component without property-decoration this directive works as it should, but when I use property-decoration I get Failed to resolve directive: data-test-attr error, same thing happens when I try to extend another component instead of Vue, all inherited methods doesnt work and I get Error in v-on handler: "TypeError: e.myMethod is not a function" ...Am I doing something wrong or is there a known problem with the vite / rollup? Thank you!
Component
Vite.config.js
Package.json