UNPKG

459 BJavaScriptView Raw
1var fs = require('fs');
2var path = require('path');
3
4module.exports = function(config) {
5 return function() {
6 var excludeFromStats = [
7 /node_modules[\\\/]react(-router)?[\\\/]/
8 ];
9
10 this.plugin('done', function(stats) {
11 var statsPath = path.join(config.dir, 'build', 'stats.json');
12 fs.writeFileSync(statsPath, JSON.stringify(stats.toJson({
13 chunkModules: true,
14 exclude: excludeFromStats
15 })));
16 });
17 };
18};
\No newline at end of file