Where index.jsx is the barrel that I export any public facing APIs of the module. Currently this is producing an expose object like:
{
'Button/index': 'Button/index.jsx`
}
which means the import would have to be import Button from 'xolvio_ui/Button/index' which isn't very intuitive since I can usually omit the index part using regular import/export semantics.
This PR removes the /index at the end of the path so the expose object looks more like:
{
'Button': 'Button/index.jsx`
}
which means the import would be just import Button from 'xolvio_ui/Button'
I'll often organize components like such:
Where
index.jsx
is the barrel that I export any public facing APIs of the module. Currently this is producing anexpose
object like:which means the import would have to be
import Button from 'xolvio_ui/Button/index'
which isn't very intuitive since I can usually omit theindex
part using regularimport/export
semantics.This PR removes the
/index
at the end of the path so theexpose
object looks more like:which means the import would be just
import Button from 'xolvio_ui/Button'