Hi, I am unable to import a custom code component Task in Plasmic Studio in Next.js.
If I understand it correctly, the component should appear in Plasmic Studio after plasmic-init.tsx is run, but no component appears.
Here is my plasmic-init.tsx:
import { initPlasmicLoader } from "@plasmicapp/loader-nextjs";
import Task from "./components/Task";
export const PLASMIC = initPlasmicLoader({
projects: [
{
id: "project_id", // ID of a project you are using
token: "token" // API token for that project
}
],
preview: true,
})
PLASMIC.registerComponent(Task, {
name: 'Task',
props: {
content: "string"
},
importPath: './components/Task',
isDefaultExport: true
})
Hi, thank you very much, I forgot to configue the project app host, that was the issue!
However, now after setting <http://localhost:3000/plasmic-host> as the plasmic host, studio.plasmic.app hasn’t loaded yet after 5 minutes. What may be the issue ?