How to use babel-plugin-transform-runtime - 1 common examples

To help you get started, we’ve selected a few babel-plugin-transform-runtime examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github conventional-changelog / commitlint / @packages / babel-preset-commitlint / index.js View on Github external
const addModuleExports = require('babel-plugin-add-module-exports');
const fastAsync = require('fast-async');
const jsx = require('babel-plugin-transform-react-jsx');
const transformRuntime = require('babel-plugin-transform-runtime').default;
const env = require('babel-preset-env').default;

module.exports = preset;

function preset() {
	const plugins = [
		addModuleExports,
		[jsx, {pragma: 'h'}],
		[fastAsync, {spec: true}],
		[transformRuntime, {polyfill: false, regenerator: false}]
	];

	return {
		env: {
			development: {
				plugins

babel-plugin-transform-runtime

Externalise references to helpers and builtins, automatically polyfilling your code without polluting globals

MIT
Latest version published 8 years ago

Package Health Score

80 / 100
Full package analysis

Popular babel-plugin-transform-runtime functions