1.2.0 • Published 2 years ago

ecma-webpack-plugin v1.2.0

Weekly downloads
587
License
MIT
Repository
github
Last release
2 years ago

ecma-webpack-plugin npm.io npm.io

Verify your wepback output code is compliant to the ECMAScript version you're targeting.

This is useful for cases when you want to be sure your babel options get you covered and especially if you exclude node modules directory like the official babel recommendation (I mean, why would you exclude the packages you don't control?).

Example webpack.config.js

const EcmaPlugin = require('ecma-webpack-plugin');

module.exports = {
	// ...
	plugins: [
		// ...,
		new EcmaPlugin({ parser: { ecmaVersion: '5' } })
  ]
};

Options:

OptionsMeaningdefaults
parserParser options (Acorn)Acorn defaults
extensionsFile extensions to verify['js', 'mjs']