I get the following error since I switched from Vue CLI version 2 to 3:
You are using the runtime-only build of Vue where the template compiler is not available. Either pre-compile the templates into render functions, or use the compiler-included build.
Here's how I instantiate Vue:
new Vue({
el: '#app',
store,
router,
components: {
UserStatus
},
data: {
isLoading: true
}
})
This worked with version 2, why not on version 3?
This answer proposes to import Vue
's template compiler via import Vue from 'vue/dist/vue.esm.js';
, however this creates issues with Vuetify
, and I still don't understand why there's any need to import the template compiler if version 2 didn't need to.
Just in case here's the content of my index.html. Also here's my app's entire codebase.
As a reminder here's the out-of-the-box way of instantiating the main Vue
instance, which is inadequate for me because it overrides whatever I manually wrote inside the <div id="app">
element in my index.html
, and also involves an App.vue
component which I actually don't have or want to have:
new Vue({
router,
store,
render: h => h(App)
}).$mount('#app')