[Vuejs]-Vue.js: converting a new Vue().$mount() to an export for server side rendering

0👍

Here is what I have right now, which works:

app.js:

import Vue from 'vue';
import AppLayout from './theme/Layout.vue';
import router from '../router';
import store from './vuex/index';

Vue.config.productionTip = false;

const app = new Vue ({
    router,
    ...AppLayout,
    store
});

export {app, router, store};

main.js:

import {app} from './app';

app.$mount('#app');

Leave a comment