feat: 页面处理为预渲染

This commit is contained in:
chdjj
2023-12-05 01:18:32 +08:00
parent 24b80f04c2
commit bd90d496e7
4 changed files with 2881 additions and 3513 deletions
+10
View File
@@ -0,0 +1,10 @@
import {constantRoute} from "./src/router/router"
import vitePluginSeoPrerender from "vite-plugin-seo-prerender";
export function seoperender(){
const filterPath = ['/:pathMatch(.*)*', '/404']; // 排除的路径
return vitePluginSeoPrerender({
routes: constantRoute.map(routeConfig => routeConfig.path).filter(path => !filterPath.includes(path)),
network: true,
// removeStyle: true
})
}