A Gatsby plugin for pre-evaluating code at build-time using babel-plugin-preval.
npm install --save gatsby-plugin-preval babel-plugin-preval
Edit gatsby-config.js
:
module.exports = {
plugins: ['gatsby-plugin-preval'],
};
For examples of usage, please see the readme of babel-plugin-preval.