From 2e0f33228866da32c16ee4d047de427cab8200f2 Mon Sep 17 00:00:00 2001 From: Ou Date: Thu, 24 Oct 2024 21:15:03 +0800 Subject: [PATCH] chore: disable pwa --- server/api/login.ts | 2 +- vite.config.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/server/api/login.ts b/server/api/login.ts index 255f4ed..f2a6d2b 100644 --- a/server/api/login.ts +++ b/server/api/login.ts @@ -1,5 +1,5 @@ import process from "node:process" export default defineEventHandler(async (event) => { - return sendRedirect(event, `https://github.com/login/oauth/authorize?client_id=${process.env.G_CLIENT_ID}`) + sendRedirect(event, `https://github.com/login/oauth/authorize?client_id=${process.env.G_CLIENT_ID}`) }) diff --git a/vite.config.ts b/vite.config.ts index 9a955bd..d7f1166 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -8,14 +8,14 @@ import tsconfigPath from "vite-tsconfig-paths" import unocss from "unocss/vite" import dotenv from "dotenv" import type { VitePWAOptions } from "vite-plugin-pwa" -import { VitePWA } from "vite-plugin-pwa" +// import { VitePWA } from "vite-plugin-pwa" import { projectDir } from "./shared/dir" dotenv.config({ path: join(projectDir, ".env.server"), }) -const pwaOption: Partial = { +const _pwaOption: Partial = { includeAssets: ["icon.svg", "apple-touch-icon.png"], manifest: { name: "NewsNow", @@ -106,7 +106,7 @@ export default defineConfig({ }), unocss(), react(), - VitePWA(pwaOption), + // VitePWA(pwaOption), nitro(nitroOption), ], })