0.0.1 • Published 5 years ago

@hqjs/babel-plugin-transform-define v0.0.1

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

babel-plugin-transform-define

Substitute object defenitions and typeof expressions e.g.

import babelTransformDefine from '@hqjs/babel-plugin-transform-define';

{
  plugins: [
    [ babelTransformDefine, {
      'process.env.NODE_ENV': 'development',
      'typeof window': 'object',
    }]
  ]
}

will substitute values of expressions process.env.NODE_ENV and typeof window into the code.

Installation

npm install hqjs@babel-plugin-transform-define