Sunday 18 March 2018

[Help] How do libraries like material-ui achieve this sort of module pathing?

I am building a React library, and I'm to the point where I want to start figuring out how the developer experience is going to go. I really like how libraries like material-ui and react-bootstrap let you pull directly from a path, rather than deconstructing (though I'm sure this isn't that big of an issue).Pathing in question:import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'So, I've gone through material-ui's github, and I've gone through their npm module once it is installed and I see essentially how it is happening. They have each individual file/folder in the root of the project. That's cool and all, but I can't seem to find anything in their build/publish process that would dictate that this sort of folder structure should be generated. Does anyone have any ideas on how I could achieve this?

Submitted March 19, 2018 at 01:44AM by ChubsTheBear

No comments:

Post a Comment