How to have multiple Plasmic projects in the same repo with conflicting component names?

We try to have multiple plasmic projects in the same repo. For that we need multiple plasmic.json files. We tried to just rename the existing plasmic.json file and this fails already with quite a strange error message:

$ plasmic sync
... works
$ mv plasmic.json plasmic-website.json
$ plasmic sync --config plasmic-website.json

Plasmic error: "srcDir" in plasmic.json is outside of .
1 Like

You don’t need to use multiple plasmic.json; multiple projects can share the same plasmic.json. Just specify the projects you want to sync as plasmic sync -p P1 -p P2

1 Like

The thing is we have name conflicts in the components of the two projects. Thus we thought we could just generate the code completely independent to avoid them.

Or is there a better way to handle name conflicts in different projects?

hmm could you try passing a full path to --config?

This works: plasmic sync --config $PWD/plasmic-website.json

But now I see that it still creates plasmic.lock instead of plasmic-website.lock which I’d expect. So it still won’t work with multiple plasmic-foo.json files.

hmm, yeah :confused:

How would you like to deal with name conflicts? The Plasmic* files should already be in separate folders, but the wrapper files will all go into srcDir. You could edit the file location for each wrapper file to point to a different location so they don’t collide, but it is tedious :confused:

Maybe being able to define a prefix per project?