Hi
@efficient_pelican
, we tried reproducing with some recent versions of remix but could not do so. What version of remix and what platform runtime are you using? Do you have an example repo that you can point us to?
Regarding shared layout, do you mean you are trying to exempt the plasmic dash host page from shared layout that is global to the rest of the pages in The app? If so, you can do this from your route view by checking the URL and opting out, like shown here:
https://github.com/plasmicapp/plasmic/blob/master/examples/hydrogen-oxygen-with-model-renderer/app/root.tsx#L88
thanks for reply - i’m using latest version of remix + plasmic
yarn dev
only works if i comment this out in
/app/routes/_index.tsx
:
export const loader = async () => {
const plasmicData = await PLASMIC.fetchComponentData("/")
return json(plasmicData)
Strange, I see the error in this repo, but it never occurs in our other Hydrogen example repos.
One question - where are you trying to deploy your Hydrogen app?
There are some benefits with respect to bundling/performance, auditability/debuggability, and compatibility with platforms like Oxygen
The main downside is that it requires you kick off a build on publish (via say a webhook), instead of being able to treat the Plasmic designs as data loaded and cached via API, and the DX is not quite as polished yet as loader
That’s referring to how loader-react works - it loads the code from Plasmic’s APIs “at runtime” (in a loader/getStaticProps/getServerSideProps) and evals it
With build-time codegen, you are loading the code from Plasmic’s APIs at build time instead and writing them out as source files on disk