FormidableLabs / babel-plugin-transform-define

Compile time code replacement for babel similar to Webpack's DefinePlugin
MIT License
245 stars 31 forks source link

Can't define some values that equals false with Boolean operation #37

Closed tz5514 closed 7 years ago

tz5514 commented 7 years ago

There's a bug that we can't defined some "false value", like false, 0, ''(empty string), undefined, null just like following code It will be ignored in babel compiling.

{
  "plugins": [
    ["transform-define", {
      "EMPTY_STRING": "",
      "FALSE_BOOLEAN": false,
      "ZERO_NUMBER": 0,
      "NULL": null
    }]
  ]
}
bspaulding commented 7 years ago

Looks like this is fixed on master, but not released to npm?

baer commented 7 years ago

This is fixed in 1.3! Hoooray!

tz5514 commented 7 years ago

thanks for fixing!