Skip to content

Commit

Permalink
feat: add mako ad (#12569)
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaohuoni authored Jul 15, 2024
1 parent 6b780ba commit 6a456f2
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/preset-umi/src/commands/dev/dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 6a456f2

Please sign in to comment.