Skip to content

Commit fe09a2f

Browse files
ikobesorrycc
authored andcommitted
非 TTY 环境输出简单的构建信息 (umijs#1425)
1 parent 2d339cc commit fe09a2f

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

  • packages/af-webpack/src/getConfig

packages/af-webpack/src/getConfig/index.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -255,10 +255,14 @@ export default function(opts) {
255255
.use(require('webpack/lib/DefinePlugin'), [resolveDefine(opts)]);
256256

257257
// plugins -> progress bar
258-
if (!process.env.CI && !process.env.__FROM_UMI_TEST && process.stdout.isTTY) {
259-
webpackConfig
260-
.plugin('progress')
261-
.use(require('webpackbar'), [{ minimal: false }]);
258+
if (process.stdout.isTTY) {
259+
if (!process.env.CI && !process.env.__FROM_UMI_TEST) {
260+
webpackConfig
261+
.plugin('progress')
262+
.use(require('webpackbar'), [{ minimal: false }]);
263+
}
264+
} else {
265+
console.log('Building ...');
262266
}
263267

264268
// plugins -> ignore moment locale

0 commit comments

Comments
 (0)