Created
July 30, 2017 15:11
-
-
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.
This file contains 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
'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