Skip to content

Instantly share code, notes, and snippets.

@911neo
Forked from learncodeacademy/webpack.config.js
Created July 31, 2016 22:27
Show Gist options
  • Save 911neo/972f4b728a30d11cc905d791a9f68f69 to your computer and use it in GitHub Desktop.
Save 911neo/972f4b728a30d11cc905d791a9f68f69 to your computer and use it in GitHub Desktop.
Sample Basic Webpack Config
var debug = process.env.NODE_ENV !== "production";
var webpack = require('webpack');
module.exports = {
context: __dirname,
devtool: debug ? "inline-sourcemap" : null,
entry: "./js/scripts.js",
output: {
path: __dirname + "/js",
filename: "scripts.min.js"
},
plugins: debug ? [] : [
new webpack.optimize.DedupePlugin(),
new webpack.optimize.OccurenceOrderPlugin(),
new webpack.optimize.UglifyJsPlugin({ mangle: false, sourcemap: false }),
],
};
@911neo
Copy link
Author

911neo commented Jul 31, 2016

web pack config

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment