Created
April 8, 2019 06:15
-
-
Save boombang/5ff48726b7831f3e963af3006e3396fb 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 { 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