Load hostLessComponents into self-host builder

We are self-hosting the Plasmic builder/studio, and want to make hostLessComponents / plasmicpkgs available in the Component Store.

I know part of it is defined on the DEVFLAGS, but the components reference a projectId.

I see there’s pkg-mgr but the plasmicpkgs does not make the *-master-pkg.json available.

Also, I know we could also install them manually to each project, but we would require an app host, which we don’t want for all projects.

What is the way to load them and make them installable to all projects?

There’s canvas-packages, but they are not loaded

Not sure if there’s something else to make it easier, but solve it by using “createHostLessProject” from the DbMgr

@angel If you’re adding a completely new hostless package, there are few places in the codebase where the package name must be added/referenced. If you just need to make an existing hostless package (e.g. as defined in platform/canvas-packages/hostlessList.json) available when self hosting, you can:

  1. Create a new blank project
  2. Make sure it’s viewable for external users
  3. Manually update the URL to https://my-local-plasmic/projects/``<project-id>?setHostLessProject=true to show the hostless submit form
  4. Enter the package name (e.g. fetch), and npm name (e.g. @plasmicpkgs/fetch) and submit
  5. Add an entry to devflags

The process is somewhat tedious, but only needs to be done once per package. I’ll see if we can get some docs added to the repo.

1 Like