Skip to content

Instantly share code, notes, and snippets.

@JellyBool
Created October 29, 2016 08:23
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save JellyBool/11138a4b98ba760e24fa8589ad1b7947 to your computer and use it in GitHub Desktop.
Save JellyBool/11138a4b98ba760e24fa8589ad1b7947 to your computer and use it in GitHub Desktop.
webpack lesson
var debug = process.env.NODE_ENV !== "production";
var webpack = require('webpack');
module.exports = {
context: __dirname,
devtool: debug ? "inline-sourcemap" : null,
entry: "./js/entry.js",
output: {
path: __dirname + "/js",
filename: "app.min.js"
},
plugins: debug ? [] : [
new webpack.optimize.DedupePlugin(),
new webpack.optimize.OccurenceOrderPlugin(),
new webpack.optimize.UglifyJsPlugin({ mangle: false, sourcemap: false }),
],
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment