webpack-encoding-plugin-quiet
Control Webpacks output encoding
Last updated 9 years ago by ymfe .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install webpack-encoding-plugin-quiet 
SYNC missed versions from official npm registry.

Webpack Encoding Plugin

Take control over the encoding of emitted webpack assets. This can be useful, if the delivering webserver enforces a specific content-type, so that your js-code is not interpreted as utf-8 by the browser.

Usage

install module

npm install webpack-encoding-plugin

setup webpack config

var EncodingPlugin = require('webpack-encoding-plugin');
module.exports = {
    entry: './entry.js',
    output: {
        path: '../dist',
        filename: 'bundle.js'
    },
    plugins: [new EncodingPlugin({
      encoding: 'iso-8859-1'
    })]
};

Additional options:

test, include, exclude RegExp or array of RegExps to filter processed files (default test is /(\.js|\.css)($|\?)/i)

Encodings

The Plugin uses iconv-lite to handle the encoding. A list of supported encodings can be found here

Current Tags

  • 0.2.1                                ...           latest (9 years ago)

1 Versions

  • 0.2.1                                ...           9 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (3)
Dev Dependencies (0)
None
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |