Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
/* global VUEPRESS_VERSION, LAST_COMMIT_HASH*/
import { createApp } from '@vuepress/core/lib/app/app.js'
import { sync } from 'vuex-router-sync';
const { app, router } = createApp(false /* isServer */)
const store = app.$options.store
if (window.__INITIAL_STATE__) {
store.replaceState(window.__INITIAL_STATE__);
}
sync(store, router);
window.__VUEPRESS_VERSION__ = {
version: VUEPRESS_VERSION,
hash: LAST_COMMIT_HASH
}
router.onReady(() => {
if (!window.__INITIAL_STATE__) {
fetchMetadata(router.currentRoute);
}