From 1d953f4626394ad3a832ec7e79556dc93d6a65e4 Mon Sep 17 00:00:00 2001 From: canisminor1990 Date: Sun, 24 Nov 2024 23:14:45 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20chore:=20Enable=20ssr?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .dumirc.ts | 7 +++++++ package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.dumirc.ts b/.dumirc.ts index b6b63fc..553bfcf 100644 --- a/.dumirc.ts +++ b/.dumirc.ts @@ -4,6 +4,8 @@ import { INavItem } from 'dumi/dist/client/theme-api/types'; import { description, homepage } from './package.json'; +const isProduction = process.env.NODE_ENV === 'production'; + const isWin = process.platform === 'win32'; const nav: INavItem[] = [ @@ -15,6 +17,7 @@ const nav: INavItem[] = [ const themeConfig: SiteThemeConfig = { actions: [ { + icon: 'Github', link: homepage, openExternal: true, text: 'Github', @@ -68,7 +71,10 @@ export default defineConfig({ define: { 'process.env': process.env, }, + exportStatic: {}, + extraBabelPlugins: ['antd-style'], favicons: ['https://lobehub.com/favicon.ico'], + jsMinifier: 'swc', locales: [{ id: 'en-US', name: 'English' }], mfsu: isWin ? undefined : {}, npmClient: 'pnpm', @@ -76,6 +82,7 @@ export default defineConfig({ sitemap: { hostname: 'https://readme-wizard.lobehub.com', }, + ssr: isProduction ? {} : false, styles: [ `html, body { background: transparent; } diff --git a/package.json b/package.json index 1fc688c..8af9d80 100644 --- a/package.json +++ b/package.json @@ -92,7 +92,7 @@ "concurrently": "^8.2.2", "cross-env": "^7.0.3", "dumi": "^2.4.14", - "dumi-theme-lobehub": "^1.9.2", + "dumi-theme-lobehub": "^1.10.4", "eslint": "^8.57.1", "father": "^4.5.1", "husky": "^9.1.7",