Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

babel-preset: multiple modules produce the same import #104

Open
layershifter opened this issue Apr 25, 2022 · 0 comments · May be fixed by #414
Open

babel-preset: multiple modules produce the same import #104

layershifter opened this issue Apr 25, 2022 · 0 comments · May be fixed by #414
Labels
🐞 bug Something isn't working

Comments

@layershifter
Copy link
Member

layershifter commented Apr 25, 2022

#103 fixed handling of multiple exports of the same module, but there is an edge case with multiple modules:

import { makeStyles as makeStylesA } from 'module-a'
import { makeStyles as makeStylesB } from 'module-b'

// ⬇️⬇️⬇️

import { __styles } from 'module-a'
import { __styles } from 'module-b' // 💥 duplicate import for "__styles"

This will explode as __styles is duplicated identifier. We should use local imports for this case, i.e. result should be:

import { __styles } from 'module-a'
import { __styles as __stylesB } from 'module-b'

References

@layershifter layershifter added the 🐞 bug Something isn't working label Apr 25, 2022
@layershifter layershifter changed the title babel-plugin: multiple modules produce the same import babel-preset: multiple modules produce the same import Jul 22, 2022
@layershifter layershifter linked a pull request Jul 31, 2023 that will close this issue
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
1 participant