Skip to content

Instantly share code, notes, and snippets.

@boombang
Created April 8, 2019 06:15
Show Gist options
  • Save boombang/5ff48726b7831f3e963af3006e3396fb to your computer and use it in GitHub Desktop.
Save boombang/5ff48726b7831f3e963af3006e3396fb to your computer and use it in GitHub Desktop.
const { resolve, join } = require('path')
const CompressionPlugin = require('compression-webpack-plugin')
module.exports = {
entry: './app.js',
output: {
path: resolve(join(__dirname, 'build')),
filename: 'app.js'
},
module: {
rules: [
{
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: 'babel-loader',
options: {
presets: [
['@babel/preset-env']
]
}
}
}
]
},
plugins: [
new CompressionPlugin()
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment