-
Notifications
You must be signed in to change notification settings - Fork 227
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
Why '.../dist/' ? #100
Comments
Have you considered the impact using the compiled version will have on your bundle size? Using the uncompiled version allows for tree shaking which will lead to smaller bundle sizes. |
@ebeloded sorry for the late reply. We thought that the uncompiled components would be used more than the compiled components. Like @ben-mckernan referenced, we saw it as a bundle savings. We also thought that having the transpiled code in a After installing a few other packages and seeing what is distributed from the entry point it seems like we have this backwards, and in fact |
Dear maintainers,
I find it a bit off-putting that to use a component one has to import the compiled version from
@material/react-button/dist
(as opposed to simply@material/react-button
). Is there a reason why you decided to make it so?Apart from the packages in this repo I have never had to reference
/dist
- it is not obvious for me as a component consumer. What's more, in the docs to every component, the imports in demo look as one would expect :import Button from '@material/react-button'
. Yet this won't work without having to transpile imported modules or in create-react-app context.Please, let me if there is a good reason behind this decision I may not understand.
The text was updated successfully, but these errors were encountered: