Created
June 9, 2019 04:28
-
-
Save SilencerWeb/b533dc466d8d200b06aaad04d4a3f498 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 path = require('path'); | |
const UglifyJsPlugin = require('uglify-js-plugin'); | |
module.exports = { | |
target: 'node', | |
mode: 'production', | |
entry: { | |
main: path.join(__dirname, 'src', 'index.js'), | |
}, | |
output: { | |
path: path.join(__dirname, 'dist'), | |
}, | |
module: { | |
rules: [ | |
{ | |
loader: 'babel-loader', | |
test: /\.js?$/, | |
exclude: /node_modules/, | |
query: { cacheDirectory: true }, | |
}, | |
], | |
}, | |
optimization: { | |
minimizer: [ | |
new UglifyJsPlugin({ | |
cache: true, | |
parallel: true, | |
sourceMap: true, | |
}), | |
], | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment