Skip to content

Instantly share code, notes, and snippets.

@hkhc
Created April 30, 2020 03:32
Show Gist options
  • Select an option

  • Save hkhc/ccafeb717fcd551c5533605ebe68adbe to your computer and use it in GitHub Desktop.

Select an option

Save hkhc/ccafeb717fcd551c5533605ebe68adbe to your computer and use it in GitHub Desktop.
Webpack config with BOM plugin
const path = require('path');
var BomPlugin = require('webpack-utf8-bom'); // add this line
module.exports = {
entry: './src/index.js',
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist')
},
// add the following block
plugins: [
new BomPlugin(true)
],
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment