UNPKG

@omni-door/tpl-spa-vue

Version:
10 lines (9 loc) 927 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.tpl_src_routes = void 0; var utils_1 = require("@omni-door/utils"); var tpl = "`import { createRouter, createWebHashHistory } from 'vue-router';\nimport Home from '@pages/home';\n${ts ? `/* import types */\nimport type { RouteRecordRaw } from 'vue-router';\n` : ''}\nconst routes${ts ? ': Array<RouteRecordRaw>' : ''} = [\n {\n path: '/',\n name: 'Home',\n component: Home\n },\n {\n path: '/detail',\n name: 'Detail',\n component: () => import('@pages/detail'),\n children: [\n {\n path: ':id',\n component: () => import('@components/Detail')\n }\n ]\n }\n];\n\nconst router = createRouter({\n history: createWebHashHistory(),\n routes\n});\n\nexport default router;\n`"; exports.tpl_src_routes = { tpl: tpl }; exports.default = utils_1.tplEngineInit(exports.tpl_src_routes, 'tpl');