# webpack-iconv-plugin

> Webpack plugin to change encoding of output file

Latest version **0.0.2** (published 2017-05-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install webpack-iconv-plugin
pnpm add webpack-iconv-plugin
yarn add webpack-iconv-plugin
bun add webpack-iconv-plugin
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2017-05-23 |
| First published | 2017-05-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Yoshiyuki Kato |
| Maintainers | yoshiyuki |
| Keywords | webpack, iconv |

## Links

- npm: https://www.npmjs.com/package/webpack-iconv-plugin
- Repository: https://github.com/YoshiyukiKato/webpack-iconv-plugin
- Homepage: https://github.com/YoshiyukiKato/webpack-iconv-plugin#readme
- Issues: https://github.com/YoshiyukiKato/webpack-iconv-plugin/issues
- npm.io page: https://npm.io/package/webpack-iconv-plugin

## Dependencies (1)

- [iconv](https://npm.io/package/iconv.md) ^2.2.3

## Alternatives

- [@fortawesome/react-fontawesome](https://npm.io/package/@fortawesome/react-fontawesome.md) — 2.2M weekly downloads
- [roboto-fontface](https://npm.io/package/roboto-fontface.md) — 196.0K weekly downloads
- [@react-native-vector-icons/common](https://npm.io/package/@react-native-vector-icons/common.md) — 150.4K weekly downloads
- [@procore/core-icons](https://npm.io/package/@procore/core-icons.md) — 4.6K weekly downloads
- [@react-md/material-icons](https://npm.io/package/@react-md/material-icons.md) — 1.6K weekly downloads

## Recent versions

- 0.0.2 (latest) — 2017-05-23
- 0.0.1 — 2017-05-23

## README

## webpack-iconv-plugin
Webpack plugin to change encoding of output. This plugin depends on [node-iconv](https://github.com/bnoordhuis/node-iconv#supported-encodings).

## Usage

```js
//webpack.config.js
const WebpackIconvPlugin = require("webpack-iconv-plugin");

module.exports = {
  //...your webpack config
  plugins: [
    new WebpackIconvPlugin("UTF-8", "SHIFT-JIS", "TRANSLIT", { "\\\\" : "¥" })
  ]
};
```

### WebpackIconvPlugin(from, to, whenUntranslatable, preReplaceMap)
#### from/to
Encoding of input and output. See [here](https://github.com/bnoordhuis/node-iconv#supported-encodings) to know supported encordings.

#### whenUntranslatable
How to deal with an input including untranslatable chars. See [here](https://github.com/bnoordhuis/node-iconv#supported-encodings) to know available settings.

- TRANSLIT
- IGNORE

#### preReplaceMap
Correspondence table of chars to replace before translation.  
For instance, in case of converting from `UTF-8` to `SHIFT-JIS`, `\` could not be translated. To escape characters, `SHIFT-JIS` uses `¥` instead of `\`.  
We want to replace `\` as `¥` before translation of iconv. In this case, we pass a map of chars:

```js
{
  "\\\\" : "¥"
}
```

## LICENSE
MIT

---
_Source: https://npm.io/package/webpack-iconv-plugin · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
