diff --git a/.env.example b/.env.example index a0c04ed..68241c3 100644 --- a/.env.example +++ b/.env.example @@ -14,3 +14,4 @@ NEXT_PUBLIC_CustomTitle=NezhaDash NEXT_PUBLIC_CustomDescription=NezhaDash is a dashboard for Nezha. NEXT_PUBLIC_Links=[{"link":"https://baidu.com","name":"Baidu"},{"link":"https://google.com","name":"Google"}] NEXT_PUBLIC_DisableIndex=false +NEXT_PUBLIC_BASE_PATH=/dash diff --git a/bun.lockb b/bun.lockb index 5b87449..b010c72 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/next.config.mjs b/next.config.mjs index 376bd45..00d39a8 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -1,6 +1,8 @@ import withPWAInit from "@ducanh2912/next-pwa"; import withBundleAnalyzer from "@next/bundle-analyzer"; import createNextIntlPlugin from "next-intl/plugin"; +import { env } from "next-runtime-env"; + const bundleAnalyzer = withBundleAnalyzer({ enabled: process.env.ANALYZE === "true", @@ -22,6 +24,7 @@ const withPWA = withPWAInit({ /** @type {import('next').NextConfig} */ const nextConfig = { output: "standalone", + basePath: env("NEXT_PUBLIC_BASE_PATH") || "", logging: { fetches: { fullUrl: true, diff --git a/package.json b/package.json index af47d95..e79df68 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nezha-dash", - "version": "1.2.9", + "version": "1.3.0", "private": true, "scripts": { "dev": "next dev -p 3020", @@ -51,19 +51,19 @@ "typescript-eslint": "^8.14.0" }, "devDependencies": { - "eslint-plugin-turbo": "^2.2.3", + "eslint-plugin-turbo": "^2.3.0", "eslint-plugin-unused-imports": "^4.1.4", "@next/bundle-analyzer": "^15.0.3", "@types/node": "^22.9.0", "@types/react": "npm:types-react@19.0.0-rc.1", "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1", "autoprefixer": "^10.4.20", - "eslint": "^9.14.0", + "eslint": "^9.15.0", "eslint-config-next": "^15.0.3", "postcss": "^8.4.49", "prettier": "^3.3.3", "prettier-plugin-tailwindcss": "^0.6.8", - "tailwindcss": "^3.4.14", + "tailwindcss": "^3.4.15", "typescript": "^5.6.3" }, "overrides": {