Skip to content

Instantly share code, notes, and snippets.

@hkhc
Created April 30, 2020 03:47
Show Gist options
  • Save hkhc/e5961e4df1cb8f5b0d7a8e9c6730ebd0 to your computer and use it in GitHub Desktop.
Save hkhc/e5961e4df1cb8f5b0d7a8e9c6730ebd0 to your computer and use it in GitHub Desktop.
Webpack config with ascii_only option
const path = require('path');
const TerserPlugin = require('terser-webpack-plugin');
module.exports = {
entry: './src/index.js',
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist')
},
optimization: {
minimize: true,
minimizer: [
new TerserPlugin({
terserOptions: { output: { ascii_only: true } }
})
],
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment