HubSpot / cms-react

A repo to expose CMS react examples, React defaults modules, and more to CMS devs
http://github.hubspot.com/cms-react/
Apache License 2.0
30 stars 15 forks source link

Certain uses of Islands cause your website to disappear #70

Open happycollision opened 3 months ago

happycollision commented 3 months ago

As first mentioned in the Slack channel, depending on how you import/export an Island-ized component, your build will complete successfully but will result in an absurdly broken website.

components/basic/

  C.tsx

  D.tsx // imports C directly

components/modules/

  A.tsx // imports D as an island

  B.tsx // imports C directly

Result:

Screenshot 2024-06-26 at 3 19 13 PM (1)

lt-frank-columbo commented 2 months ago

Same issue here. We started using cms-react a month ago for a new project.

  1. We created a module (a module without any island)
  2. Deployed it on a dev-portal; all good.
  3. Days later, we deploy a new build (no issues in the log).
  4. All modules on the existing page show the same comment in the DOM as yours does. In the editor-sidebar, the fields are gone and say "The module used to create this content could not be found. [...]". When drag-n-dropping the same module into the page, the newly added module works just fine. It's just that all existing modules are broken. Re-deploying an old version of the build doesn't bring back the content.
happycollision commented 2 months ago

I got word from the HS team working on react-cms that Slack is the better place for now to report (or +1) on bugs. See the readme in this repo for how to get invited in.