Migrating to Vite getting Vue warn: $attrs and $listeners is readonly.
rosenfeldalon opened this issue · 2 comments
rosenfeldalon commented
Migrating from Webpack to Vite as part of migrating the app to Vue 3, getting the already reported in the past #342:
Vue warn:
-
$attrs is readonly.
-
$listeners is readonly
-
Vue version: 2.7.10
-
Component Version: 3.2.18
therealtimhawkins commented
I had the same issue and solved it using the alias in the vite.config.js
resolve: {
alias: {
vue: 'vue/dist/vue.esm.js'
}
}
rosenfeldalon commented
I ended up writing my own component, so I hope therealtimhawkins answer helps other cases