0.1.2-legacy • Published 7 years ago

@gzzhanghao/babel-require v0.1.2-legacy

Weekly downloads
-
License
MIT
Repository
github
Last release
7 years ago

babel-require

Require modules with standalone babel context.

Usage

import BabelRequire from 'babel-require'

const babelRequire = new BabelRequire({
  globals: {
    // global variables in child context
  },
  // you can use your own babel-polyfill and babel-register module
  polyfillPath: 'babel-polyfill/dist/polyfill',
  registerPath: 'babel-register',
  babelOptions: {
    // options available in babel-register
  },
})


// you can access the global object of child context with:
babelRequire.context

const module = babelRequire.require(modulePath)
0.1.2-legacy

7 years ago

0.1.1-legacy

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago