A wepback plugin to verify ECMAScript version for bundle files.
MIT License
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.
% npm install --save-dev ecma-version-validator-webpack-plugin
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.ecmaVersion
5
(ES5).options.test
RegExp
pattern to apply this plugin. The default value is /\.(m)?js$/
.