2.0.0 • Published 5 years ago

bom-or-nobom v2.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

webpackv4-utf8-bom

FORK OF webpack-utf8-bom ADD OR REMOVE BOM FOR WEBPACK

I use a Windows PC for work in company.

It creates file with BOM.

However the files generated by Webpack do not contain the BOM.

So I write this plugin for Webpack so that it can add or remove BOM automatically when generates files, by default only files matching the /.(html|htm|css|js|map)$/ pattern are processed.

Usage

In webpack config file:

var webpack = require('webpack');

// import plugin
var BomPlugin = require('webpackv4-utf8-bom');

module.exports = {
  ...
  plugins: [
    // Add plugin in plugins list
    // true for adding bom
    // false for removing bom
    new BomPlugin(true)
  ],

 ...
};