Nuxt/lib/builder/webpack/plugins/stats.js
Clark Du ef7a42649d misc: improve coverage and packaging (#3121)
nuxt-start and nuxt/legacy are also coming!
2018-03-28 02:58:17 +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'
)
})
}
}