Skip to content

Commit

Permalink
🔧 chore: Enable ssr
Browse files Browse the repository at this point in the history
  • Loading branch information
canisminor1990 committed Nov 24, 2024
1 parent 17abb83 commit 1d953f4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .dumirc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[] = [
Expand All @@ -15,6 +17,7 @@ const nav: INavItem[] = [
const themeConfig: SiteThemeConfig = {
actions: [
{
icon: 'Github',
link: homepage,
openExternal: true,
text: 'Github',
Expand Down Expand Up @@ -68,14 +71,18 @@ 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',
publicPath: '/',
sitemap: {
hostname: 'https://readme-wizard.lobehub.com',
},
ssr: isProduction ? {} : false,
styles: [
`html, body { background: transparent; }
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 1d953f4

Please sign in to comment.