ai-plugin-template
ai-plugin-template copied to clipboard
How we can access third party helper lib inside FigmaPluginAPI
I want to use third party lib inside figmaAPI
if i try to access it throws me below error
figmaAPI.ts:60 Uncaught (in promise) Error: _figma_plugin_helpers__WEBPACK_IMPORTED_MODULE_6__ is not defined
at cb (webpack-internal:///(localhost:3000/app-pages-browser)/./lib/figmaAPI.ts:52:32)
cb @ figmaAPI.ts:60
My Code Sample
import { nodeToObject } from "@figma-plugin/helpers";
<Button
onClick={() => {
figmaAPI.run(async (figma) => {
const node = figma.currentPage.selection[0];
const json = nodeToObject(node);
console.log(json);
});
}}
>
Action
</Button>
Is there is any way i can use this helper functions inside plugin
Thanks :)