prod.config.js 650 B

123456789101112131415161718192021222324252627282930
  1. var webpack = require('webpack');
  2. var base = require('./base.config');
  3. var config = base('production');
  4. // production overrides go here
  5. config.plugins.push(new webpack.DefinePlugin({
  6. 'process.env': {
  7. NODE_ENV: JSON.stringify('production'),
  8. },
  9. }));
  10. // See https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/config/webpack.config.prod.js.
  11. config.plugins.push(new webpack.optimize.UglifyJsPlugin({
  12. sourceMap: true,
  13. compress: {
  14. screw_ie8: true,
  15. warnings: false
  16. },
  17. mangle: {
  18. screw_ie8: true
  19. },
  20. output: {
  21. comments: false,
  22. screw_ie8: true
  23. },
  24. }));
  25. module.exports = config;