ecma-webpack-plugin

1.2.0 • Public • Published

ecma-webpack-plugin

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:

Options Meaning defaults
parser Parser options (Acorn) Acorn defaults
extensions File extensions to verify ['js', 'mjs']

/ecma-webpack-plugin/

    Package Sidebar

    Install

    npm i ecma-webpack-plugin

    Weekly Downloads

    2,003

    Version

    1.2.0

    License

    MIT

    Unpacked Size

    5.22 kB

    Total Files

    7

    Last publish

    Collaborators

    • omrilotan