robbie-sdk
Version:
Robbie Visio SDK to send events for analaysis
48 lines (42 loc) • 1.03 kB
JavaScript
;
/**
* Dist configuration. Used to build the
* final output when running npm run production.
*/
const webpack = require('webpack');
const WebpackBaseConfig = require('./Base');
const path = require('path');
class WebpackDistConfig extends WebpackBaseConfig {
constructor() {
super();
this.config = {
cache: false,
devtool: 'eval',
plugins: [
new webpack.DefinePlugin({
'process.env.NODE_ENV': '"production"'
}),
new webpack.LoaderOptionsPlugin({
minimize: true
}),
new webpack.NoEmitOnErrorsPlugin(),
new webpack.optimize.AggressiveMergingPlugin(),
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false,
unused: true,
dead_code: true
}
})
]
};
}
/**
* Get the environment name
* @return {String} The current environment
*/
get env() {
return 'production';
}
}
module.exports = WebpackDistConfig;