From dde4e9fb653a15f6394241f8841342fcdee77315 Mon Sep 17 00:00:00 2001 From: sorrycc Date: Thu, 9 May 2024 15:10:40 +0800 Subject: [PATCH] chore: update --- packages/preset-umi/src/features/mako/mako.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/preset-umi/src/features/mako/mako.ts b/packages/preset-umi/src/features/mako/mako.ts index 521d3c606adc..ef6290f9f1c2 100644 --- a/packages/preset-umi/src/features/mako/mako.ts +++ b/packages/preset-umi/src/features/mako/mako.ts @@ -1,5 +1,6 @@ import path from 'path'; import { IApi } from '../../types'; +import { chalk } from '@umijs/utils'; export default (api: IApi) => { api.describe({ @@ -21,15 +22,17 @@ export default (api: IApi) => { }); api.onStart(() => { - if (!process.env.OKAM) { - process.env.OKAM = require.resolve('@umijs/bundler-mako'); - } + process.env.OKAM = process.env.OKAM || require.resolve('@umijs/bundler-mako'); try { const pkg = require(path.join( require.resolve(process.env.OKAM), '../package.json', )); api.logger.info(`Using mako@${pkg.version}`); + const isBigfish = process.env.BIGFISH_INFO; + if (!isBigfish) { + api.logger.warn(chalk.yellow(chalk.bold(`Mako is an extremely fast, production-grade web bundler based on Rust. And it's still under active development and is not yet ready for production use. If you encounter any issues, please checkout https://makojs.dev/ to join the community and report the issue.`))); + } } catch (e) { console.error(e); }