UNPKG

universal-javascript-vue

Version:

A fully-isomorphic (universal) ES6/ES7 boilerplate based on Vue.js

17 lines (12 loc) 397 B
import Vue from 'vue'; import App from './app.vue'; import {createRouter} from './core/router'; import {createStore} from './core/store'; import {sync} from 'vuex-router-sync'; export function createApp() { const store = createStore(); const router = createRouter(store); sync(store, router); const app = new Vue({router, store, render: h => h(App)}); return {app, router, store}; }