Repository URL to install this package:
|
Version:
3.2.0 ▾
|
import webpack from 'webpack'
import configs from './webpack.config.js'
const compiler = webpack(configs)
const ENV_INFRA = process.env.CI !== undefined
console.log('begining the build...')
compiler.run((compilationError, stats) => {
if (compilationError) {
throw compilationError
// console.error(compilationError)
// return
}
if (ENV_INFRA) {
console.log('minimal logs for CI')
} else {
const json = stats.toJson({
reasons: true,
errors: true,
modules: true,
exclude: true,
chunks: true,
verbose: true,
debug: true,
providedExports: false,
usedExports: true,
maxModules: 1000,
})
require('fliplog')
.json(json)
.bold('STATS')
.echo()
console.log(stats.toString({ colors: true }))
}
})