|
| 1 | +import { defineConfig } from 'dumi'; |
| 2 | +import path from 'node:path'; |
| 3 | + |
| 4 | +import { homepage } from '../package.json'; |
| 5 | + |
| 6 | +const isWin = process.platform === 'win32'; |
| 7 | + |
| 8 | +const isProd = process.env.NODE_ENV === 'production'; |
| 9 | + |
| 10 | +const themeConfig = { |
| 11 | + actions: [ |
| 12 | + { |
| 13 | + link: homepage, |
| 14 | + openExternal: true, |
| 15 | + text: 'Github', |
| 16 | + }, |
| 17 | + { |
| 18 | + link: 'https://github.com/lobehub/lobe-chat', |
| 19 | + text: 'Try it on LobeChat', |
| 20 | + type: 'primary', |
| 21 | + }, |
| 22 | + ], |
| 23 | + footer: 'Made with 🤯 by LobeHub', |
| 24 | + name: 'Realtime Weather', |
| 25 | + socialLinks: { |
| 26 | + discord: 'https://discord.gg/AYFPHvv2jT', |
| 27 | + github: homepage, |
| 28 | + }, |
| 29 | +}; |
| 30 | + |
| 31 | +export default defineConfig({ |
| 32 | + alias: { |
| 33 | + '@': path.join(__dirname, '../src'), |
| 34 | + }, |
| 35 | + base: isProd ? '/docs/' : '/', |
| 36 | + extraBabelPlugins: ['babel-plugin-antd-style'], |
| 37 | + favicons: [ |
| 38 | + 'https://registry.npmmirror.com/@lobehub/assets-emoji/1.3.0/files/assets/package.webp', |
| 39 | + ], |
| 40 | + mfsu: isWin ? undefined : {}, |
| 41 | + npmClient: 'pnpm', |
| 42 | + outputPath: '../public/docs', |
| 43 | + |
| 44 | + publicPath: isProd ? '/docs/' : '/', |
| 45 | + // ssr: isProduction ? {} : false, |
| 46 | + styles: [ |
| 47 | + `html, body { background: transparent; } |
| 48 | +
|
| 49 | + @media (prefers-color-scheme: dark) { |
| 50 | + html, body { background: #000; } |
| 51 | + }`, |
| 52 | + ], |
| 53 | + |
| 54 | + themeConfig, |
| 55 | + title: 'RealTime Weather - Lobe Chat Plugin', |
| 56 | +}); |
0 commit comments