Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How we can access third party helper lib inside FigmaPluginAPI #6

Open
adarsh-technocrat opened this issue Feb 15, 2024 · 0 comments
Open

Comments

@adarsh-technocrat
Copy link

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant