-
-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Labels
questionFurther information is requestedFurther information is requested
Description
I git cloned this repo and replaced id with my plugin id and run npm run dev,
import plugin manifest.json from dist file. Figma popup a toast saying my plugin has been imported. But there nothing changed/show up in the plugin panel
// Upate:
I resolved the problem by added inspect capability and dev editorType
// https://www.figma.com/plugin-docs/manifest/
export default {
name: "Mojito Designer",
id: "1427862707767191704",
api: "1.0.0",
main: "plugin.js",
ui: "index.html",
capabilities: ["inspect"],
enableProposedApi: false,
editorType: ["figma", "figjam", "dev"],
};and also modify plugin.ts as follow:
import * as Networker from "monorepo-networker";
import { initializeNetwork } from "@common/network/init";
import { NetworkSide } from "@common/network/sides";
import { NetworkMessages } from "@common/network/messages";
async function bootstrap() {
initializeNetwork(NetworkSide.PLUGIN);
debugger;
if (figma.editorType === "figma" || figma.editorType === "dev") { // <-----
figma.showUI(__html__, {
width: 800,
height: 650,
title: "My Figma Plugin!",
});
}
console.log("Bootstrapped @", Networker.Side.current.getName());
NetworkMessages.HELLO_UI.send({ text: "Hey there, UI!" });
}
bootstrap();khuepm and iGoodie
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested