Can I re-export stylex from a shared package? #1106
Closed
sergiocarneiro
started this conversation in
General
Replies: 1 comment 1 reply
-
You can configure the importSources like this (PR to improve the docs) importSources: [{ from: '@comp/ui', as: 'css' }], See this, for example: https://github.com/facebook/react-strict-dom/blob/0.0.35/packages/react-strict-dom/babel/preset.js#L31 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I was experimenting with re-exporting stylex from my UI package. However, I only managed to it successfully when I exported it in isolation, either via a separate package or a separate export. Is this expected behavior or am I missing something?
❌ Fails
In this attempt, I exported stylex together with the rest of the UI library from the index file:
✅ Works
In this attempt, stylex is exported separately from the rest of the library, as the default module. I could also create a separate package.
Beta Was this translation helpful? Give feedback.
All reactions