1.2.1 • Published 2 years ago

ecma-version-validator-webpack-plugin v1.2.1

Weekly downloads
3,242
License
MIT
Repository
github
Last release
2 years ago

ecma-version-validator-webpack-plugin

npm version npm.io npm.io

A wepback 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 ecma-version-validator-webpack-plugin

How to use

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

  • webpack.config.js
const { ECMAVersionValidatorPlugin } = require("ecma-version-validator-webpack-plugin");

module.exports = {
    // ...
    plugins: [
      new ECMAVersionValidatorPlugin(/* options */)
    ],
}

Options

constructor

  • 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).
  • options.test
    • A RegExp pattern to apply this plugin. The default value is /\.(m)?js$/.

LICENCE

1.2.0

2 years ago

1.2.1

2 years ago

1.1.0

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago