var fs = require('fs');
var path = require('path');

module.exports = function(opts, config) {
  return function() {
    if (config.prerender)
      return;

    this.plugin('done', function(stats) {
      var statsPath = path.join(opts.dir, 'build', 'stats.json');
      fs.writeFileSync(statsPath, JSON.stringify(stats.toJson({
        chunkModules: true,
        exclude: [(/node_modules[\\\/]react/)]
      })));
    });
  };
};
@@ -118,42 +118,131 @@
     
-if (config.prerender)%0A      return
+var excludeFromStats = %5B%0A      /node_modules%5B%5C%5C%5C/%5Dreact(-router)?%5B%5C%5C%5C/%5D/,%0A      /node_modules%5B%5C%5C%5C/%5Ditems-store%5B%5C%5C%5C/%5D/%0A    %5D
 ;%0A%0A 
@@ -461,37 +461,24 @@
 de: 
-%5B(/node_modules%5B%5C%5C%5C/%5Dreact/)%5D
+excludeFromStats
 %0A   

Update exclude stats