Skip to content

Commit 77e5d74

Browse files
committed
docs: update dumi config
1 parent 833e64a commit 77e5d74

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

.dumirc.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
// more config: https://d.umijs.org/config
22
import { defineConfig } from 'dumi';
33

4+
const isProdSite =
5+
// 不是预览模式 同时是生产环境
6+
process.env.PREVIEW !== 'true' && process.env.NODE_ENV === 'production';
7+
8+
const name = 'cssinjs';
9+
410
export default defineConfig({
511
favicons: ['https://avatars0.githubusercontent.com/u/9441414?s=200&v=4'],
612
themeConfig: {
@@ -9,4 +15,6 @@ export default defineConfig({
915
},
1016
outputPath: '.doc',
1117
exportStatic: {},
18+
base: isProdSite ? `/${name}/` : '/',
19+
publicPath: isProdSite ? `/${name}/` : '/',
1220
});

0 commit comments

Comments
 (0)