So I would expect plasmic to pick up that change and update the PlasmicOsitoEmailLayout.tsx
file which currently looks like this:
// app/components/plasmic/osito/PlasmicOsitoEmailLayout.tsx
import { EmailImg } from "@react-email/img"; // plasmic-import: k0LYSWegDX/codeComponent
The import statement should look like this now
import EmailImg from "@react-email/img";
How do I force plasmic to re generate this file?
I just deleted the file and ran plasmic-watch
but it didn’t help
do I need to recreate plasmic.json
or something?
oh! this is a code component, and you changed its isDefaultExport
?
you’ll need to load the plasmic project with the updated host page with the new registration, which is how plasmic learns about the new code component metadata. Then when you do plasmic sync
again, it will use the new metadata
@chungwu One more weird issue…
When I do npm run build
i get an error in this plasmic-generated file
./components/OsitoEmailButton.tsx:40:11
Type error: Type '{ dashboardUrl?: string; buttonText?: string; className?: string; }' is not assignable to type '"Unexpected extraneous props"'.
Here’s the plasmic-generated file in question (minus the comments)
import * as React from "react";
import {
PlasmicOsitoEmailButton,
DefaultOsitoEmailButtonProps
} from "./plasmic/osito/PlasmicOsitoEmailButton";
export interface OsitoEmailButtonProps extends DefaultOsitoEmailButtonProps {}
function OsitoEmailButton(props: OsitoEmailButtonProps) {
return <PlasmicOsitoEmailButton {...props} />;
}
VSCode also flags the same error when I open that file, fwiw
hmm what do you see as the definition for DefaultOsitoEmailButtonProps
?
// app/components/plasmic/osito/PlasmicOsitoEmailButton.tsx
export interface DefaultOsitoEmailButtonProps {
dashboardUrl?: string;
buttonText?: string;
className?: string;
}
hmm looks right to me… could you put it up on github?
any chance there’s something weird in the way OsitoEmailButton
is constructed within Plasmic Studio?
it’s because the underlying EmailButton
component doesn’t take in a className
prop