UNPKG

927 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.tpl_src_routes = void 0;
4var utils_1 = require("@omni-door/utils");
5var 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`";
6exports.tpl_src_routes = {
7 tpl: tpl
8};
9exports.default = utils_1.tplEngineInit(exports.tpl_src_routes, 'tpl');