The `plasmic-loader.json` file
You can now specify PlasmicLoader options via the plasmic-loader.json
file. This file is generated the first time PlasmicLoader executes and is managed by you.
The configuration is nearly identical as with the plugin options with a tiny change - projects
is now an array of objects with projectId
, and optionally, projectApiToken
.
Plugin configuration still works, and takes precedence over configuration defined in plasmic-loader.json
.
Prop | Default | Description |
---|---|---|
projects | None (Only required setting!) | An array of projects. Each project consist of the projectId , and optionally, projectApiToken . |
dir | Current working directory. | The root directory of your project. |
plasmicDir | .cache/.plasmic (Gatsby) .plasmic (Next) | Plasmic will sync your plasmic projects to this directory. |
pageDir | src/pages (Gatsby) pages(Next) | A directory with your existing pages. |
watch | True (in development) False otherwise. | Listen to changes in your plasmic project and sync them to your codebase. |
initArgs | Platform-dependent. | Plasmic is able to detect your codebase language (js, tsx) and comes with good defaults for public folder, image assets, css mode and other options. Click here for a full list. To override something, pass an object with the key being plasmic CLI’s flag name and the corresponding value. |
substitutions | None | Click here. for more information regarding component substitution. |
Was this page helpful?
Have feedback on this page? Let us know on our forum.