We are trying to copy codegen components into a standalone Nextjs app, but get this error related to deriveRenderOpts.
I assume we need to remove all code that keeps us connected Plasmic to fix this, but maybe there some Plasmic dependency still require?
@certified_dog is there anything else you want to add here?
Hi, you didn’t actually sent a screenshot of the error that you are facing, could you send one ?
The error is that func is not defined when we trying to copy codegen components to a standalone Nextjs app @fmota
And I saw this func in plasmic codegen app is in the elements.d.ts from @plasmicapp
Yes, it comes from @plasmicapp/react-web
, could you clarify a bit what are you trying to achieve ? Do you want to be able to use the components without installing @plasmicapp/react-web
?
We are designing in Plasmic with Chakra UI code components and want to deliver in a new NextJS code base 100% independent of Plasmic Studio.
Till now the developers have been looking at our designs in Plasmic in the same way as Figma (where they inspect our code components and props), and now we want to give them the whole FED code (components and layouts too). Later we may use Plasmic Studio’s publish feature (Webhooks CI/CD pipeline) - so we do not have to create a new code based.
I think this is achieved through plasmic export -p projectId
, which performs a different type of codegen which provides a less plasmic based export, but I would wait for @chungwu to explain here more exactly how this works, as I am not familiar with it, I don’t know exactly the implications of running it in your prod application, I guess you could experiment in a smaller project and see how it works out
Oh OK thx. Looking forward ti getting more info from @chungwu.
We tried to achieve this through plasmic export -p projectId
. But seems still have some props, func etc. from plasmic.
Have you tried plasmic export -p projectId
@verbal_sparrow ?
Sorry but you cannot remove dependency on @plasmicapp/react-web
OK. Does that even matter for the developers? Is it just a dependency that they will be happy to use like Framer-Motion is not Framer studio?
I mean like this for Charkra
npm i @chakra-ui/react @emotion/react @emotion/styled framer-motion
Yeah it is just another npm library to depend on
OK cool - so we now have a code base that in independent of Plasmic Studio?
Yes, the generated code has no live dependency on Plasmic except for that npm library
IS that it then or do we still “wait for @chungwu to explain here more exactly how this works” - says Felipe?