From e9df65298ecb13cb40e0a62615be9b7de8ead1ba Mon Sep 17 00:00:00 2001 From: Jinbao1001 Date: Mon, 29 Apr 2024 21:12:19 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E8=B0=83=E6=95=B4external=E4=B8=8Epla?= =?UTF-8?q?tform=E4=BC=A0=E5=85=A5=E6=96=B9=E5=BC=8F,=20=E4=B8=8Ebundle-we?= =?UTF-8?q?bpack=E5=AF=B9=E9=BD=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/mako/package.json | 2 +- src/builder/bundle/index.ts | 2 +- src/builder/bundle/utils.ts | 18 ------------------ 3 files changed, 2 insertions(+), 20 deletions(-) delete mode 100644 src/builder/bundle/utils.ts diff --git a/examples/mako/package.json b/examples/mako/package.json index 9ed166a8..90ba4c3b 100644 --- a/examples/mako/package.json +++ b/examples/mako/package.json @@ -1,6 +1,6 @@ { "scripts": { - "build": "OKAM=@alipay/umi-bundler-okam father build", + "build": "father build", "build:no-clean": "father build --no-clean", "dev": "father dev", "dev:no-clean": "father dev --no-clean", diff --git a/src/builder/bundle/index.ts b/src/builder/bundle/index.ts index f13ade76..d885d4b8 100644 --- a/src/builder/bundle/index.ts +++ b/src/builder/bundle/index.ts @@ -68,7 +68,7 @@ async function bundle(opts: IBundleOpts): Promise { chainWebpack: config.chainWebpack, define: config.define, devtool: config.sourcemap && ('source-map' as DevTool), - externals: config.externals || {}, + externals: config.externals, outputPath: config.output.path, // postcss config diff --git a/src/builder/bundle/utils.ts b/src/builder/bundle/utils.ts deleted file mode 100644 index a855e24f..00000000 --- a/src/builder/bundle/utils.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { chalk, lodash } from '@umijs/utils'; -import path from 'path'; -import { logger } from '../../utils'; -import type { IBundleConfig } from '../config'; - -// workaround for combine continuous onBuildComplete log in watch mode -export const logStatus = (config: IBundleConfig) => { - lodash.debounce( - () => - logger.info( - `Bundle from ${chalk.yellow(config.entry)} to ${chalk.yellow( - path.join(config.output.path, config.output.filename), - )}`, - ), - 100, - { leading: true, trailing: false }, - ); -};