1.1.1 • Published 6 years ago

@drupe/env-plugin-babel v1.1.1

Weekly downloads
1
License
MIT
Repository
gitlab
Last release
6 years ago

@drupe/env-plugin-babel

Babel plugin

Installation

npm i --save-dev @drupe/env-plugin-babel

# When using the 'transformRuntime' option:
npm i --save-dev babel-plugin-transform-runtime

# When using the 'polyfill' option:
npm i --save-dev babel-polyfill

Usage

plugins/babel.js

const BabelPlugin = require('@drupe/env-plugin-babel')

module.exports = new BabelPlugin({
	// The following are all default options:

	// Webpack rule configuration:
	test: /\.js$/,
	exclude: /node_modules/,
	presets: ['env'],

	// Use 'babel-plugin-transform-runtime':
	transformRuntime: false,
	// Include 'babel-polyfill' package with each client entry:
	polyfill: false
})