Skip to content

dornfeder/webpack-utf8-bom

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

webpack-utf8-bom

ADD OR REMOVE BOM FOR WEBPACK

I use a Windows PC for work in company.

It creates file with BOM.

Howerver 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('webpack-utf8-bom');

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

 ...
};

About

ADD OR REMOVE BOM

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%