Skip to content

Instantly share code, notes, and snippets.

@carlosrymer
Created July 30, 2017 15:11
Show Gist options
  • Save carlosrymer/a755ab8823280280c51c4d72efba6aa6 to your computer and use it in GitHub Desktop.
Save carlosrymer/a755ab8823280280c51c4d72efba6aa6 to your computer and use it in GitHub Desktop.
A Webpack 3 configuration file used for building an app for deployment. Relies on: https://gist.github.com/carlosrymer/dff53dd8ab35574f236174530b6f1a44.
'use strict';
const path = require('path');
const webpack = require('webpack');
const config = require('./webpack.config');
const UglifyJsPlugin = webpack.optimize.UglifyJsPlugin;
const uglifyOptions = {
mangle : {
except : ['$super', '$', 'exports', 'require', 'angular']
}
};
config.output = {
filename : '[name].min.js',
path : path.resolve(__dirname, 'src'),
publicPath : ''
};
config.plugins.push(new UglifyJsPlugin(uglifyOptions));
module.exports = config;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment