babel-plugin-define

v1.0.0
Babel plugin for pre-processing defines

Define constants to replace with expression

Example:

[ "define", {
   "__API_ROOT__": "document.location.origin + '/api'",
   "__SOCKET_ROOT__": "document.location.origin",
   "__DEBUG__": "false",
   "__ACTIVE_CONFIG__": "LiveUI"
} ]
npm i babel-plugin-define

Metadata

  • MIT
  • Whatever
  • Yury Michurin
  • released 3/9/2016

Downloads

Maintainers