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.

PropDefaultDescription
projectsNone (Only required setting!)An array of projects. Each project consist of the projectId, and optionally, projectApiToken.
dirCurrent working directory.The root directory of your project.
plasmicDir.cache/.plasmic (Gatsby)
.plasmic (Next)
Plasmic will sync your plasmic projects to this directory.
pageDirsrc/pages (Gatsby)
pages(Next)
A directory with your existing pages.
watchTrue (in development)
False otherwise.
Listen to changes in your plasmic project and sync them to your codebase.
initArgsPlatform-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.
substitutionsNoneClick here. for more information regarding component substitution.
Was this page helpful?

Have feedback on this page? Let us know on our forum.