New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

rollup-plugin-convert-encoding

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rollup-plugin-convert-encoding

Rollup plugin to file encode.

latest
npmnpm
Version
0.0.1
Version published
Maintainers
1
Created
Source

Rollup Convert Encoding Plugin

This Rollup plugin converts file encoding.

Usage

Install

npm install rollup-plugin-convert-encode

Setup

example for rollup.config.js

import encode from 'rollup-plugin-convert-encoding';
const dist = 'dist/converted.js';

const options = {
	dist: dist,
	encodingFrom: 'EUC-JP',
	encodingTo: 'SHIFT_JIS'
}
export default {
	input: 'example/index.js',
	plugins: [ encode(options) ],
	output: [
        {
		    format: 'cjs',
			file: dist
		}
	]
};

Options

dist

Type: string Default: null

File output destination.

encodingFrom

Type: string Default: utf8

Original file encoding.

encodingTo

Type: string Default: utf8

Output file encoding.

iconv

Type: object Default: {decode: {}, encode: {}}

iconv-lite BOM Handling option.

About encodings

The plugin uses iconv-lite to handle the encoding. Support encodings listed on the iconv-lite page.

License

MIT License

Keywords

rollup-plugin

FAQs

Package last updated on 08 Oct 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts