Skip to content

Instantly share code, notes, and snippets.

@amb101
Created July 18, 2018 03:24
Show Gist options
  • Save amb101/ada6daae792bdc26e75d1b9827bbe683 to your computer and use it in GitHub Desktop.
Save amb101/ada6daae792bdc26e75d1b9827bbe683 to your computer and use it in GitHub Desktop.
Barebones Webpack Config
const debug = process.env.NODE_ENV !== "production";
const webpack = require('webpack');
module.exports = {
context: __dirname,
devtool: debug ? "inline-sourcemap" : false, // true || false val required
entry: "./js/scripts.js",
output: {
path: __dirname + "/js",
filename: "scripts.min.js"
},
plugins: debug ? [] : [
new webpack.optimize.OccurrenceOrderPlugin(),
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