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
I using console.log(<Home />) and console.log(<Login />) and see Babel generate by name of JS file. So, if I import components with same name, babel will generate index.Home, index2.Login => ERROR.
I must change file name to fix this case
I think you need change the way to generate import file, and it's better if I have some config to auto import index.js (I want to babel auto check and find index.js <script type="text/babel" data-presets="config-preset" src="src/pages/Home/index.js"></script> => <script type="text/babel" data-presets="config-preset" src="src/pages/Home"></script>
Hey @letanloc1998! We really appreciate you taking the time to report an issue. The collaborators on this project attempt to help as many people as possible, but we're a limited number of volunteers, so it's possible this won't be addressed swiftly.
If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack community that typically always has someone willing to help. You can sign-up here for an invite."
馃捇
How are you using Babel?
Other (Next.js, Gatsby, vue-cli, ...)
Input code
I using Babel standalone with React. I can't import same js name component (different URL).
routes-index.js
I using
console.log(<Home />)
andconsole.log(<Login />)
and see Babel generate by name of JS file. So, if I import components with same name, babel will generateindex.Home
,index2.Login
=> ERROR.I must change file name to fix this case
routes-index.js
I think you need change the way to generate import file, and it's better if I have some config to auto import index.js (I want to babel auto check and find index.js
<script type="text/babel" data-presets="config-preset" src="src/pages/Home/index.js"></script>
=><script type="text/babel" data-presets="config-preset" src="src/pages/Home"></script>
Thank you a lot.
Configuration file name
No response
Configuration
No response
Current and expected behavior
I want to import without error
Environment
Babel standalone version 7.15.3
Possible solution
Change the way to generate import object (full url instead only file name)
It's better if you add feature allow config auto import index.js if find url fail or alway find index.js if suffix isn't js file
Additional context
No response
The text was updated successfully, but these errors were encountered: