2.1.0 • Published 6 years ago

babel-plugin-node v2.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

babel-plugin-node

Make any environment node compatible. It aliases all the node native API requires and adds buffer and process to the global scope.

Install

Pick your flavour up:

yarn add --dev babel-plugin-node

npm install --save-dev babel-plugin-node

Usage

In your .babelrc:

{
  "plugins": [
    "babel-plugin-node"
  ]
}

And in your app's entry point (index.js):

import 'babel-plugin-node/polyfill'
// or
require('babel-plugin-node/polyfill')