import Vue from 'vue' import Router from 'vue-router' import { normalizeURL, decode } from 'ufo' import { interopDefault } from './utils' import scrollBehavior from './router.scrollBehavior.js' const _4c4bd4da = () => interopDefault(import('../pages/autofill.ts' /* webpackChunkName: "pages/autofill" */)) const _a9d81b18 = () => interopDefault(import('../pages/submit.ts' /* webpackChunkName: "pages/submit" */)) const _6619b0c9 = () => interopDefault(import('../pages/index.vue' /* webpackChunkName: "pages/index" */)) const emptyFn = () => {} Vue.use(Router) export const routerOptions = { mode: 'history', base: '/', linkActiveClass: 'nuxt-link-active', linkExactActiveClass: 'nuxt-link-exact-active', scrollBehavior, routes: [{ path: "/autofill", component: _4c4bd4da, name: "autofill" }, { path: "/submit", component: _a9d81b18, name: "submit" }, { path: "/", component: _6619b0c9, name: "index" }], fallback: false } export function createRouter (ssrContext, config) { const base = (config._app && config._app.basePath) || routerOptions.base const router = new Router({ ...routerOptions, base }) // TODO: remove in Nuxt 3 const originalPush = router.push router.push = function push (location, onComplete = emptyFn, onAbort) { return originalPush.call(this, location, onComplete, onAbort) } const resolve = router.resolve.bind(router) router.resolve = (to, current, append) => { if (typeof to === 'string') { to = normalizeURL(to) } return resolve(to, current, append) } return router }