I expected the callback when running listen to happen after the build was complete, but instead it calls right after. Any recommendation for having a hook that runs after the build?
I'd like to output stats on how long it took to build in the console.
var compiler = webpack(...);
compiler.plugin("done", function() { ... });
new WebpackDevServer(compiler, ...
Nice, thank you. I tried this, but now it does this:
build took 12154ms
Your build is complete.
Note: If you see a warning about your routes, this is ok!
We do dynamic requires that causes Webpack to output this error
Hash: 8e732e1dd38dc1252ce6
Version: webpack 1.7.0
Time: 12088ms
Asset Size Chunks Chunk Names
sunrise.jpg 61778 [emitted]
river.jpg 35232 [emitted]
winter.jpg 30584 [emitted]
yosemite.jpg 93280 [emitted]
main.js 1703306 0 [emitted] main
chunk {0} main.js (main) 1508450 [rendered]
...
I guess I can do a setTimeout, but is there a cleaner way to hook in so I can output that stuff _after_ the build stats?
The setTimeout seems to work alright for now.
@sokra ,Thanks for your pretty answer.
Most helpful comment