imports
property seems to have stopped working as intended, could you confirm?
#249
Labels
bug
Something isn't working
TL;DR
imports
doesn't seem to override the import statements anymore, and it's simply added together with the other import statements.Context
A few weeks ago I connected some components between Figma and our design system via Code Connect. I've used
imports
to override the import statement as mentioned on issue #16, and it was working fine until recently. For example, I had the following code:As expected, inside Code Connect, the only import statement present was:
However, last week I noticed all components were now showing multiple import statements. It seems the property used inside
imports
is simply being added to the list instead of overriding all of them.Examples
Here are a couple of examples containing the
example
section in code and the Code Connect in Dev Mode.Button example
The
Button
was working fine and I haven't touched it in the past few days. I published all Code Connect components when I was adding a new one (Modal
below), and then realised the "imports issue." When I checked the button and all other components, they had the same issue.Modal example
This was the "new" component that made me realise the issue. When I published it using
npx figma connect publish
, which published all other components with it, I noticed the unwantedimport
statements. I went to check the other ones, and all of them had the same issue.Bug or intended behaviour?
Am I right in assuming this is not the intended behaviour and it's likely a bug? If it is a bug, can someone else see it too on their side, or should I raise a support ticket to investigate my case individually?
I don't know exactly when the issue started. I realised when testing the new component, but it could be there beforehand.
Important
It was working fine in all (4~6) components before. The issue started after I published everything together, and even those components that were working and I didn't touch, got the issue
1.3.1
The text was updated successfully, but these errors were encountered: