1.0.6 • Published 3 years ago

add-charset-webpack-plugin v1.0.6

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

add-charset-webpack-plugin

a webpack plugin which add charset to css file

Installation

npm install add-charset-webpack-plugin

This is a webpack that add charset to final css files;

Usage

webpack.config.js

const AddCharsetWebpackPlugin = require("add-charset-webpack-plugin");

module.exports = {
  plugins: [
    new AddCharsetWebpackPlugin({
      charset: "utf-8"
    })
  ]
}

This will add charset declare in the first line of all the final css files, example as following

@charset "utf-8";

html {
  margin: 0,
  padding: 0
}

body {
  min-width: 960px;
  background: #FFFFFF;
  font-size: 14px;
}
...

Options

You can pass a hash of configuration options to add-charset-webpack-plugin.Allowed values are as follows:

NameTypeDefaultDescription
charset{String}utf-8To display an HTML page correctly, a web browser must know which character set to use, Defaults to utf-8

License

Copyright (c) 2021-present VN666

MIT (see LICENSE)

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago