Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

ecma-version-validator-webpack-plugin

koba0424kMIT1.2.1TypeScript support: included

A wepback plugin to verify ECMAScript version for bundle files

webpack, ecma

readme

ecma-version-validator-webpack-plugin

npm version

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

changelog

Changelog

All notable changes to this project will be documented in this file. See standard-version for commit guidelines.

1.2.1 (2022-03-09)

Bug Fixes

  • deps: update dependency acorn to ^8.7.0 (#158) (334cb13)

1.2.0 (2022-03-07)

Features

Bug Fixes

  • deps: update dependency acorn to ^8.0.5 (4169f25)
  • deps: update dependency acorn to ^8.2.4 (e7f0a91)
  • deps: update dependency acorn to ^8.4.1 (#150) (ab2e4d2)

1.1.0 (2020-10-15)

Features

Bug Fixes

  • deps: update dependency acorn to ^7.2.0 (#10) (e31f88b)
  • deps: update dependency acorn to ^8.0.2 (cdc294b)
  • deps: update dependency acorn to ^8.0.3 (cfdcc12)
  • deps: update dependency acorn to ^8.0.4 (39b8b1c)
  • deps: update dependency acorn to v8 (#50) (96d51f2)
  • deps: update dependency webpack-sources to v2 (#74) (078dd9d)

1.0.4 (2020-05-08)

Bug Fixes

  • follow the appropriate way to print an error (#7) (6d09021)

1.0.3 (2020-05-08)

Bug Fixes

  • ignore non JS files based on an extension (#6) (357e007)

1.0.2 (2020-05-08)

Bug Fixes

  • support any source types other than RawSource (#5) (b475bf7)

1.0.1 (2020-05-06)

1.0.0 (2020-05-06)