Skip to content

Commit

Permalink
🐛 fix: Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
canisminor1990 committed Jan 7, 2025
1 parent f568fa1 commit 7859909
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
18 changes: 17 additions & 1 deletion example/.dumirc.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import { defineConfig } from 'dumi';
import { SiteThemeConfig } from 'dumi-theme-lobehub';
import { resolve } from 'node:path';

import { description, homepage, name } from '../package.json';

const isProduction = process.env.NODE_ENV === 'production';
const isWin = process.platform === 'win32';

const themeConfig = {
const themeConfig: SiteThemeConfig = {
actions: [
{
icon: 'Github',
Expand All @@ -20,6 +21,12 @@ const themeConfig = {
type: 'primary',
},
],
analytics: {
plausible: {
domain: 'dumi-theme.lobehub.com',
scriptBaseUrl: 'https://plausible.lobehub-inc.cn',
},
},
apiHeader: {
docUrl: `{github}/tree/master/src/{atomId}/index.md`,
match: ['/components'],
Expand All @@ -33,7 +40,12 @@ const themeConfig = {
repo: 'lobehub/lobe-ui',
repoId: 'R_kgDOJloKoA',
},
lastUpdated: true,
name: 'DUMI',
prefersColor: {
default: 'dark',
switch: false,
},
socialLinks: {
discord: 'https://discord.gg/AYFPHvv2jT',
github: homepage,
Expand All @@ -58,6 +70,10 @@ export default defineConfig({
mako: isWin || isProduction ? false : {},
mfsu: isWin ? undefined : {},
npmClient: 'pnpm',
resolve: {
atomDirs: [{ dir: 'src', type: 'component' }],
entryFile: isProduction ? './src/index.ts' : undefined,
},
ssr: isProduction ? {} : false,
styles: [
`html, body { background: transparent; }
Expand Down
1 change: 1 addition & 0 deletions example/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "dumi-theme-lobehub-example",
"private": true,
"scripts": {
"build": "dumi build",
"build:analyze": "ANALYZE=1 dumi build",
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
},
"lint-staged": {
"*.md": [
"remark --quiet --output --",
"prettier --write --no-error-on-unmatched-pattern"
],
"*.json": [
Expand Down

0 comments on commit 7859909

Please sign in to comment.