0.0.2 • Published 4 years ago

@hqjs/babel-plugin-support-nodejs-globals v0.0.2

Weekly downloads
9
License
MIT
Repository
github
Last release
4 years ago

http://hqjs.org

Support-nodejs globals

  • Buffer - adds import Buffer from 'buffer'; on top of the program npm buffer package
  • process - adds iport process from 'process'; on top of the program npm process package
  • __dirname - substitutes exact value
  • __filename - substitutes exact value
  • global - changes to globalThis (which has polyfill in core-js) works in combination with globals above

Installation

npm install hqjs@babel-plugin-support-nodejs-globals

Usage

{
  "plugins": ["hqjs@babel-plugin-support-nodejs-globals"]
}