You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have our config file set up to rename the import from our specific package, eg: import { Button } from '@namespace/react-core';
BUT, we can't account for our customers properly implementing tree-shaking of our library, so we'd like to enable dynamic import subpaths, eg: import { Button } from '@namespace/react-core/button';
This would ensure that the bundle sizes for anyone importing components from our library stay as small as possible. We also can't count on them using the ESM versions of our components (I know, I know... welcome to modern JS).
Is there an easy way to do this dynamically, instead of literally adding every component to our figma.config.json, eg:
We have our config file set up to rename the import from our specific package, eg:
import { Button } from '@namespace/react-core';
BUT, we can't account for our customers properly implementing tree-shaking of our library, so we'd like to enable dynamic import subpaths, eg:
import { Button } from '@namespace/react-core/button';
This would ensure that the bundle sizes for anyone importing components from our library stay as small as possible. We also can't count on them using the ESM versions of our components (I know, I know... welcome to modern JS).
Is there an easy way to do this dynamically, instead of literally adding every component to our
figma.config.json
, eg:If there was a way to dynamically path the imports, that would help us not
n+1
ourimportPaths
as we add Code Connect files to our components.The text was updated successfully, but these errors were encountered: