Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export async function createApp ({
start = () => {},
} = {}, ssrContext) {
// create store and router instances
const store = createStore()
const router = createRouter()
const i18n = createI18n(ssrContext, router)
const vuetify = createVuetify(ssrContext)
store.state.app.currentVersion = Vuetify.version
// sync the router with the vuex store.
// this registers `store.state.route`
sync(store, router)
// create the app instance.
// here we inject the router, store and ssr context to all child components,
// making them available everywhere as `this.$router` and `this.$store`.
const app = new Vue({
router,
store,
ssrContext,
i18n,
vuetify,
render: h => h(App),
})
export function createApp (ssrContext) {
// create store and router instances
const store = createStore()
const router = createRouter(store)
const i18n = createI18n(ssrContext)
store.state.app.currentVersion = Vuetify.version
store.state.translation.isTranslating = typeof process.env.TRANSLATE !== 'undefined'
// sync the router with the vuex store.
// this registers `store.state.route`
sync(store, router)
// create the app instance.
// here we inject the router, store and ssr context to all child components,
// making them available everywhere as `this.$router` and `this.$store`.
const app = new Vue({
router,
store,
ssrContext,
i18n,
mounted () {
window.axios = axios