From 6a456f289206c3be7a61993428693c3b538c6598 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=81=AA=E5=B0=8F=E9=99=88?= Date: Mon, 15 Jul 2024 10:19:15 +0800 Subject: [PATCH] feat: add mako ad (#12569) --- packages/preset-umi/src/commands/dev/dev.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/packages/preset-umi/src/commands/dev/dev.ts b/packages/preset-umi/src/commands/dev/dev.ts index 02c835a62283..2965ccce2de3 100644 --- a/packages/preset-umi/src/commands/dev/dev.ts +++ b/packages/preset-umi/src/commands/dev/dev.ts @@ -50,6 +50,18 @@ export default (api: IApi) => { }, }); + api.onStart(() => { + if (api.config?.mako) return; + // don't print ad in bigfish framework + if (process.env.BIGFISH_INFO) return; + if (process.env.MAKO_AD === 'none') return; + console.info( + chalk.yellow.bold( + 'Mako https://makojs.dev is a new fast Rust based bundler from us, which is heavily optimized for umi and much faster than webpack. Visit https://makojs.dev/docs/getting-started#bundle-with-umi for more details if you want to give it a try.', + ), + ); + }); + api.registerCommand({ name: 'dev', description: 'dev server for development',