Nuxt/lib/builder/webpack/plugins/stats.js

17 lines
308 B
JavaScript
Raw Normal View History

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'
)
})
}
}