Open kirlat opened 4 years ago
We're using a v-model on ul lists in word-filter-panel.vue. This would affect app logic in a more significant way, but probably is doable too.
I believe that v-model
here is redundant, it is not used and it could be simply removed.
I think that it was to be removed on previous steps of logic update.
But any way I don't see any real advantages of upgrading to Vue 3 in nearest time.
is an upgrade to Vue 3 required to support web components, if we want to do so?
is an upgrade to Vue 3 required to support web components, if we want to do so?
No, I think we can use web components with Vue 2 without any issues.
I've tried to upgrade components to use Vue 3 and I would like to share my findings.
The Vue code requires some changes, but those are mostly minimal.
Vue.extend()
does not exist any more, but, for our purposes, we can probably replace it withcreateApp()
(this is how a root Vue instance, now calledApp
, is created in Vue 3). Instead ofVue.nextTick()
we have to usenextTick()
, a function that is exported by Vue 3. Not a big deal.A little more involved is the new Vue compiler requirement that a v-model can only be used on
<input>
,<textarea>
and<select>
elements.We're using a
v-model
onul
lists inword-filter-panel.vue
. This would affect app logic in a more significant way, but probably is doable too.The biggest issue I've found so far is with transformer plugins for
webpack
. While there is a beta version ofvue-loader
and@vue/compiler-sfc
that both were updated to support Vue 3, there seems to be an issue with other plugins, such asvue-svg-loader
. I'm not sure all the Vue webpack plugins are now ready for Vue 3, and I'm afraid we can loose a lot of time making them work.There is also very little reference material on how to configure webpack and its plugins to build Vue 3, so it may be very time consuming to figure out.
So while an upgrade to webpack 5 went quite smoothly with very little changes required, Vue 3 seems to be a slightly different story. Since Vue 3 does not provide us with any new "killer" features (there is a Composition API and better performance but I think it's not the most important things for us right now), maybe we can postpone an upgrade until the final version will be out and all the tooling will be updated to work with it? @balmas, @irina060981: What do you think?