From eb68a02b171762fa0dfb883ab31a8c94b43ba75a Mon Sep 17 00:00:00 2001 From: Petard Jonson <41122242+greenhat616@users.noreply.github.com> Date: Fri, 30 Aug 2024 20:21:04 +0800 Subject: [PATCH] chore: nightly build use include sourcemap --- frontend/nyanpasu/src/router.ts | 20 +++++++++++--------- frontend/nyanpasu/vite.config.ts | 1 + 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/frontend/nyanpasu/src/router.ts b/frontend/nyanpasu/src/router.ts index 2a5ee01771..ca3f0d47d1 100644 --- a/frontend/nyanpasu/src/router.ts +++ b/frontend/nyanpasu/src/router.ts @@ -1,7 +1,7 @@ // Generouted, changes to this file will be overriden /* eslint-disable */ -import { components, hooks, utils } from '@generouted/react-router/client' +import { components, hooks, utils } from "@generouted/react-router/client"; export type Path = | `/connections` @@ -11,14 +11,16 @@ export type Path = | `/providers` | `/proxies` | `/rules` - | `/settings` + | `/settings`; -export type Params = { - -} +export type Params = {}; -export type ModalPath = never +export type ModalPath = never; -export const { Link, Navigate } = components() -export const { useModals, useNavigate, useParams } = hooks() -export const { redirect } = utils() +export const { Link, Navigate } = components(); +export const { useModals, useNavigate, useParams } = hooks< + Path, + Params, + ModalPath +>(); +export const { redirect } = utils(); diff --git a/frontend/nyanpasu/vite.config.ts b/frontend/nyanpasu/vite.config.ts index ae01dee8b3..4871951ef9 100644 --- a/frontend/nyanpasu/vite.config.ts +++ b/frontend/nyanpasu/vite.config.ts @@ -89,6 +89,7 @@ export default defineConfig(({ command }) => { build: { outDir: "dist", emptyOutDir: true, + sourcemap: isDev || IS_NIGHTLY ? "inline" : false, }, define: { OS_PLATFORM: `"${process.platform}"`,