Hello everyone and happy New Year!
I’m trying to add a custom component from my NextJS project to my Plasmic project by using the plasmic-host method, but when I run the dev server and add the <http://localhost:3000>
to the host field, it simply never loads and I get the plasmic host error.
This is my /src/pages/plasmic-host.tsx
file:
import { PlasmicCanvasHost } from '@plasmicapp/loader-nextjs';
import * as React from 'react';
import { PLASMIC } from '../../plasmic-init';
import Script from "next/script";
export default function PlasmicHost() {
return (
PLASMIC && (
<div>
<Script src="<https://static1.plasmic.app/preamble.js>" strategy="beforeInteractive" />
<PlasmicCanvasHost />
</div>
)
);
}
Regards, David.