Community Plugin
View plugin on GitHubgatsby-plugin-prodo
A Gatsby plugin for Prodo with built-in server-side rendering support.
Install
npm install --save @prodo/core @prodo/babel-plugin gatsby-plugin-prodo
How to use
Edit gatsby-config.js
const path = require(`path`);
module.exports = {
plugins: [
{
resolve: `gatsby-plugin-prodo`,
options: {
model: path.join(__dirname, `path/to/model.js`), // absolute path to the model
exportName: `model`, // optional name of the model export
storeConfig: {
// initial store configuration
initState: {
loadingUser: false,
},
initLocal: {
user: null,
},
},
},
},
],
};Options
model- String required: Absolute path to the file containing the Prodo modelexportName- String optional: Name of the model export. Defaults tomodel. If the model is the default export, usedefault.storeConfig- Any: Object passed as an argument tomodel.createStore().