Components substituted with `<PlasmicComponent>` are not rendered in production mode

How to reproduce:

  1. Use the Plasmic official doc example here plasmic/examples/supabase-auth-nextjs-pages-loader at master · plasmicapp/plasmic · GitHub
  2. Clone the example Plasmic project (Plasmic), publish it and run locally with headless API (preview: false).
  3. Substituted components are not rendered. No error present.

With “preview: true” everything is working fine.

If you don’t use <PlasmicComponent> wrapper but build your own in-code React component with returning the jsx code, it will substitute a plasmic component completely and will be rendered.

Slack issue: Slack

UPDATE: To reproduce the issue after pulling the example project (plasmic/examples/supabase-auth-nextjs-pages-loader at master · plasmicapp/plasmic · GitHub) delete file yarn.lock, then install packages.

We cannot depend on old dependencies in lock file. Please fix it!

The issue was resolved by replacing

const plasmicData = await PLASMIC.maybeFetchComponentData(plasmicPath);


const plasmicData = await PLASMIC.maybeFetchComponentData([plasmicPath], {
    deferChunks: false,

Thank you for reporting this bug! It was introduced on version 1.0.360 of @plasmicapp/loader-nextjs and should be fixed by upgrading it to version 1.0.363 or later.

1 Like