Last active
July 20, 2018 19:59
-
-
Save nairihar/90359844f85bc18f42a1319b1a57df64 to your computer and use it in GitHub Desktop.
Setup React App - Organizing React Application Part 1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const webpack = require('webpack'); | |
const merge = require('webpack-merge'); | |
const UglifyJSPlugin = require('uglifyjs-webpack-plugin'); | |
const common = require('./webpack.common.js'); | |
module.exports = merge(common, { | |
mode: 'production', | |
plugins: [ | |
new webpack.SourceMapDevToolPlugin({ | |
filename: '[name].js.map', | |
exclude: ['bundle.js'] | |
}), | |
new UglifyJSPlugin({ | |
sourceMap: true | |
}), | |
new webpack.DefinePlugin({ | |
'process.env.NODE_ENV': JSON.stringify('production') | |
}) | |
] | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment