Answer the question
In order to leave comments, you need to log in
How to render only components in vue 3 without replacing the root element?
Previously, by default, the view had a component rendering mode, when we simply indicated:
new Vue({
el: "#app"
})
Vue.createApp(RootComponent).mount('#app')
Answer the question
In order to leave comments, you need to log in
Yes, it is possible:
import { createApp } from 'vue';
createApp({
components: {
// Список компонентов, которые могут использоваться в шаблоне
},
})
.use(store)
.mount('#app');
const buildConfig = {
// Может быть что-то выше
configureWebpack: {
resolve: {
alias: {
vue$: 'vue/dist/vue.esm-bundler.js',
},
},
},
// Может еще что-то
};
module.exports = buildConfig;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question