Created
March 22, 2018 23:49
-
-
Save davehax/96a6c3fbafeee43e0b272ed2c77b064b to your computer and use it in GitHub Desktop.
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
const webpack = require("webpack"); | |
const merge = require('webpack-merge'); | |
const UglifyJSPlugin = require("uglifyjs-webpack-plugin"); | |
const common = require('./webpack.common.js'); | |
module.exports = merge(common, { | |
devtool: "source-map", | |
plugins: [ | |
new UglifyJSPlugin({ | |
sourceMap: true | |
}), | |
new webpack.DefinePlugin({ | |
"process.env.NODE_ENV": JSON.stringify("production") | |
}) | |
], | |
module: { | |
rules: [ | |
{ | |
test: /\.js$/, | |
exclude: /(node_modules|bower_components)/, | |
use: { | |
loader: 'babel-loader', | |
options: { | |
presets: ['babel-preset-env'] | |
} | |
} | |
} | |
] | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment