Skip to content

moccu/babel-browserslist-loader

Repository files navigation

babel-browserslist-loader

Build Status Coverage Status on Codecov

The webpack babel-loader with support for browsers defined in .browserslistrc for babel 6.x.

According to the missing support of a shareable browserslist config in babel-preset-env (issue 108) and the comment of skleeschulte, this functions provides a babel-loader configuration including the target browsers configuration from the browserslistrc file.

Installation

$ npm install --save-dev @moccu/babel-browserslist-loader

Usage

const babelloader = require('@moccu/babel-browserslist-loader');


module.exports = {

	// webpack config...

	rules: [
		{
			test: /\.js$/
			use: [
				babelloader()
			]
		}
	]
};

Contribute

  • Run tests using npm test
  • Set new version in package.json
  • Publish new version on npm using npm publish --access=public
  • Add github release and tag including release notes

License

MIT