Possible to use Figma Node URL from env file
I wanted to set the figma node url in an .env file and use it for Code Connect, but couldn't find any way
Is there any way to do this?
Hey @rohanchkrabrty! We don't support setting the figma node url in an .env file. What's your use case out of interest?
Depending on what you're trying to achieve we support some options in figma.config.json which might help:
documentUrlSubstitutions: dynamically swap in different URLs to publish tointeractiveSetupFigmaFileUrl: only supported by the interactive setup, but allows setting a file URL to always use
Hey @slees-figma, thanks for the reply. I’m working with a design system where the code library is public and open source, but the Figma design files are private. I’d prefer not to expose the Figma URL in the repo.
Would it be possible to support reading from .env in either figma.config.json or component.figma.tsx
On a related note, is there a way to hide or suppress the output logs from figma connect publish? The logs currently expose the source URL, which isn’t ideal given the situation I described above.
Thanks @rohanchkrabrty! We don't support either of these today but we'll track this for future discussion. I don't think we have any great workarounds here - I think the closest you'd get is manually inputting your file URL into figma.config.json documentUrlSubstitutions (or writing a script to do it)