Skip to content

koba04/rollup-plugin-ecma-version-validator

Repository files navigation

rollup-plugin-ecma-version-validator

npm version

A rollup plugin to verify ECMAScript version for bundle files.

This plugin is intended to verify that bundle files don't include unsupported syntaxes, so I encourage to enable this only on a production build.

Install

% npm install --save-dev rollup-plugin-ecma-version-validator

How to use

Add a ECMAVersionValidatorPlugin instance into a plugins field in rollup.config.js

  • rollup.config.js
import { ecmaVersionValidator } from "rollup-plugin-ecma-version-validator";

export default {
  input: "index.js",
  plugins: [ecmaVersionValidator({ /* options */ })],
};

Options

ecmaVersion

  • This is a target ECMAScript version you expect. See the avaiable versions in the Acorn's documentation. The default version is 5(ES5).

LICENCE

About

A rollup plugin to verify ECMAScript version for bundle files

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •