Pre-evaluate code at build-time with babel-macros
npm install preval.macroThis is a [babel-plugin-macros][babel-plugin-macros] macro for
[babel-plugin-preval][babel-plugin-preval].
Please see those projects for more information.
This module is distributed via [npm][npm] which is bundled with [node][node] and
should be installed as one of your project's devDependencies:
```
npm install --save-dev preval.macro
You'll also need to install and configure
[babel-plugin-macros][babel-plugin-macros] if you haven't already.
Once you've
configured babel-plugin-macros
you can import/require preval.macro. For example:
`js
import preval from 'preval.macro'
const one = prevalmodule.exports = 1 + 2 - 1 - 1`
Note:
[babel-plugin-preval][babel-plugin-preval] allows you to have a few more APIsbabel-plugin-macros
than you have with this macro, but this macro comes with all the benefits of
using [][babel-plugin-macros] (which you can read about inbabel-plugin-macros` docs).
the
[npm]: https://www.npmjs.com
[node]: https://nodejs.org
[babel-plugin-macros]: https://github.com/kentcdodds/babel-plugin-macros
[babel-plugin-preval]: https://github.com/kentcdodds/babel-plugin-preval