File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ import baseConfigFactory, {
1919 libraryName
2020} from './base.config' ;
2121import { WebAppManifest } from './interfaces' ;
22+ import * as ora from 'ora' ;
2223
2324const CompressionPlugin = require ( 'compression-webpack-plugin' ) ;
2425const TerserPlugin = require ( 'terser-webpack-plugin' ) ;
@@ -31,7 +32,7 @@ Copyright [JS Foundation](https://js.foundation/) & contributors
3132All rights reserved
3233` ;
3334
34- function webpackConfig ( args : any , spinner ?: any ) : webpack . Configuration {
35+ function webpackConfig ( args : any , spinner ?: ora . Ora ) : webpack . Configuration {
3536 const basePath = process . cwd ( ) ;
3637 const base = args . base || '/' ;
3738 const config = baseConfigFactory ( args ) ;
Original file line number Diff line number Diff line change @@ -83,13 +83,13 @@ function serveStatic(
8383 }
8484}
8585
86- function build ( config : webpack . Configuration , args : any , spinner ?: any ) {
86+ function build ( config : webpack . Configuration , args : any , spinner ?: ora . Ora ) {
8787 const compiler = createCompiler ( config ) ;
8888 spinner = spinner || ora ( ) ;
8989 spinner . start ( 'building' ) ;
9090 return new Promise < webpack . Compiler > ( ( resolve , reject ) => {
9191 compiler . run ( ( err , stats ) => {
92- spinner . stop ( ) ;
92+ spinner && spinner . stop ( ) ;
9393 if ( err ) {
9494 reject ( err ) ;
9595 }
@@ -361,8 +361,7 @@ const command: Command = {
361361 let config : webpack . Configuration ;
362362 args . experimental = args . experimental || { } ;
363363
364- const spinner = ora ( ) ;
365- spinner . text = 'building' ;
364+ const spinner = ora ( 'building' ) ;
366365 if ( args . mode === 'dev' ) {
367366 config = devConfigFactory ( args ) ;
368367 } else if ( args . mode === 'unit' || args . mode === 'test' ) {
You can’t perform that action at this time.
0 commit comments