Nuxt/lib/builder/webpack/plugins/stats.mjs
Pooya Parsa fd9672e51d refactor: move stats to stats plugin
UX: warns from friendly error now come after stats
2018-03-22 20:30:23 +04:30

17 lines
308 B
JavaScript

export default class StatsPlugin {
constructor(statsOptions) {
this.statsOptions = statsOptions
}
apply(compiler) {
compiler.hooks.done.tap('stats-plugin', stats => {
process.stdout.write(
'\n' +
stats.toString(this.statsOptions) +
'\n'
)
})
}
}