Package Exports
- babel-plugin-transform-replace-expressions
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (babel-plugin-transform-replace-expressions) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
babel-plugin-transform-replace-expressions
Replace JavaScript expressions with other expressions.
Installation
$ yarn add --dev babel-plugin-transform-replace-expressions
Example
Input file:
const env = process.env.NODE_ENV;
typeof Hello === "number";
.babelrc
:
{
"plugins": [
[
"babel-plugin-transform-replace-expressions",
{
"process.env.NODE_ENV": "\"production\"",
"typeof Hello": "42"
}
]
]
}
Output:
const env = "production";
42 === "number";
License
This plugin is licensed under the MIT license. See LICENSE.