nuxt

路由自定义

建立 app/router.options 文件加入下面内容

import type { RouterConfig } from '@nuxt/schema'
// https://router.vuejs.org/api/interfaces/routeroptions.html
export default <RouterConfig> {
	routes: (_routes) => [
		{
			name: 'home',
			path: '/',
			component: () => import('~/pages/home.vue')
		}
	],
}

关于nginx无限加载 或 等待时间长

nuxt.config 加入如下内容
experimental: {
    writeEarlyHints: false,
}
参考:https://github.com/nuxt/framework/discussions/5871
``
posted @ 2022-10-30 10:36  狂客  阅读(137)  评论(0编辑  收藏  举报