1 | var fs = require('fs');
|
2 | var path = require('path');
|
3 |
|
4 | module.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 |