atlassian-labs / compiled

A familiar and performant compile time CSS-in-JS library for React.
https://compiledcssinjs.com
Apache License 2.0
1.98k stars 68 forks source link

Fix Compiled throwing when multiple API imports exist in the same module #1612

Closed itsdouges closed 8 months ago

itsdouges commented 8 months ago

With the introduction of the strict API and custom importSources Compiled can now be used from different imports in the same module. One use case is when migrating to the new strict API but being blocked on something, so having to fallback to the current top-level API.

To ensure a smooth ride we need to enable Compiled to work when multiple imports exist in a module. This pull request changes the internal data structure to capture the local names of all Compiled APIs.

TODO

changeset-bot[bot] commented 8 months ago

🦋 Changeset detected

Latest commit: 281569c597f307aed24364d95e2fb8ec623c2fe1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ---------------------- | ----- | | @compiled/babel-plugin | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR