mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-14 18:13:54 +00:00
17 lines
308 B
JavaScript
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'
|
||
|
)
|
||
|
})
|
||
|
}
|
||
|
}
|