File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- import { resolve } from 'path' ;
1+ import { resolve , join } from 'path' ;
22import dev from 'af-webpack/dev' ;
33import chalk from 'chalk' ;
4+ import BuildStatistics from 'build-statistics-webpack-plugin' ;
5+ import BigBrother from 'bigbrother-webpack-plugin' ;
46import getConfig , {
57 watchConfigs ,
68 unwatchConfigs ,
@@ -54,6 +56,25 @@ export default function runDev(opts = {}) {
5456 entry,
5557 } ) ;
5658
59+ const stagesPath = join (
60+ __dirname ,
61+ '../.run/build-statistics/compilation.json' ,
62+ ) ;
63+ const roadhogPkg = require ( join ( __dirname , '../package.json' ) ) ;
64+ webpackConfig . plugins . push (
65+ new BuildStatistics ( {
66+ path : stagesPath ,
67+ } ) ,
68+ new BigBrother ( {
69+ cwd,
70+ tool : {
71+ name : 'roadhog' ,
72+ version : roadhogPkg . version ,
73+ stagesPath,
74+ } ,
75+ } ) ,
76+ ) ;
77+
5778 dev ( {
5879 webpackConfig,
5980 proxy : config . proxy || { } ,
You can’t perform that action at this time.
0 commit comments