Skip to content

a webpack plugin that can convert webpack assets to specific charset, like gbk of course

License

Notifications You must be signed in to change notification settings

YDSS/ConverCharsetPlugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ConverCharsetPlugin

a webpack plugin that convert webpack assets to specific charset from utf-8, like gbk of course

it will replace your html charset meta(like <meta charset="UTF-8">) and css charset declaration(like @charset 'utf-8') as well

Usage

Installation

npm install --save-dev convert-charset-plugin

note: node.js version > 8.0

Basic Use

// webpack.config.js
const ConverCharsetPlugin = require("convert-charset-plugin");

module.exports = {
    // ...
    plugins: [
        new ConverCharsetPlugin("gbk")
    ]
}

Options

  • includes(RegExp|Array), defines which file should be converted. By default only .js, .css(if you use ExtractTextWebpackPlugin), .html and .json will be converted

About

a webpack plugin that can convert webpack assets to specific charset, like gbk of course

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published