From 388203ff0c57d52022358044d2e955d5bdb4b4b6 Mon Sep 17 00:00:00 2001 From: yuanliu Date: Sat, 14 Sep 2024 15:16:47 +0800 Subject: [PATCH] chore: disable mako outside MacOS and Linux (#50837) Co-authored-by: liuyuan Co-authored-by: afc163 --- .dumirc.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.dumirc.ts b/.dumirc.ts index 81313d857c..a440e99ef3 100644 --- a/.dumirc.ts +++ b/.dumirc.ts @@ -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,9 +58,12 @@ export default defineConfig({ analytics: { ga_v2: 'UA-72788897-1', }, - analyze: process.env.NODE_ENV === 'production' ? false : { - analyzerPort: 'auto', - }, + analyze: + process.env.NODE_ENV === 'production' + ? false + : { + analyzerPort: 'auto', + }, links: [ { rel: 'prefetch',