chore: disable mako outside MacOS and Linux (#50837)

Co-authored-by: liuyuan <yuanliu147@qq.com>
Co-authored-by: afc163 <afc163@gmail.com>
This commit is contained in:
yuanliu 2024-09-14 15:16:47 +08:00 committed by GitHub
parent a63b9e9ffa
commit 388203ff0c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,6 +1,7 @@
import path from 'path';
import { defineConfig } from 'dumi';
import * as fs from 'fs-extra';
import os from 'node:os';
import rehypeAntd from './.dumi/rehypeAntd';
import remarkAntd from './.dumi/remarkAntd';
@ -21,7 +22,7 @@ export default defineConfig({
: false,
hash: true,
mfsu: false,
mako: {},
mako: ['Darwin', 'Linux'].includes(os.type()) ? {} : false,
crossorigin: {},
runtimePublicPath: {},
outputPath: '_site',
@ -57,7 +58,10 @@ export default defineConfig({
analytics: {
ga_v2: 'UA-72788897-1',
},
analyze: process.env.NODE_ENV === 'production' ? false : {
analyze:
process.env.NODE_ENV === 'production'
? false
: {
analyzerPort: 'auto',
},
links: [