You can use Define Plugin for that changing variable values. For using different modules in different env, you can use NormalModuleReplacementPlugin as follows
new webpack.NormalModuleReplacementPlugin(
/some\/path\/config\.development\.js/,
'./config.production.js'
);
Somasundaram Ayyappan
For adding LICENSE, you can use webpack's own Banner Plugin.
For removing console.log, use webpack's UglifyjsWebpackPlugin and pass
drop_console: falseas followsnew webpack.optimize.UglifyJsPlugin({ compress: { drop_console: true, // other Uglifyjs options }, // other UglifyjsWebpackPlugin options })