I am using Plasmic codegen with React and I have managed to setup the routes and plasmic host correctly. I have also registered a custom component in vscode and added that to plasmic studio and that works.
question -
When I run a plasmic sync
, after adding and configuring the custom component in plasmic studio, I get an error:
Uncaught ReferenceError: Greetings is not defined
at ./src/pages/PlasmicHost.tsx (PlasmicHost.tsx:4:1)
If I set my importPath as: importPath: "./components/Greetings",
(as mentioned in the documentation)
I get the error:
Module not found: Error: You attempted to import ../../../../components/Greetings which falls outside of the project src/ directory. Relative imports outside of src/ are not supported
If I set the importPath as: ./src/components/Greetings
I get the error:
ERROR in ./src/components/plasmic/forms/PlasmicHomepage.tsx 105:33-42
export 'Greetings' (imported as 'Greetings') was not found in '../../Greetings' (possible exports: default)
What am I missing?