Skip to content
This repository has been archived by the owner on Jan 11, 2021. It is now read-only.

joncasey/my-babel-standalone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

my-babel-standalone

This standalone build uses @babel/preset-env, @babel/polyfill, and whatwg-fetch to create an experience that mirrors modern browsers. It does not include presets for flow, react, and typescript.

Currently, it's being used in the latest builds of modern-hta.

Example

var es5 = transform('class $ { }')

function transform (code) {
  return Babel.transform(code, {
    presets: ['env'],
    plugins: [
      'proposal-function-bind',
      'proposal-optional-chaining'
    ]
  }).code.replace(/^"use strict";\s+/, '')
}

About

A small standalone build of babel

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published