Templarian / MaterialDesign-JS

Dist for Material Design Icons JS/TypeScript
Other
156 stars 18 forks source link

Separate icons into each file #15

Closed Yihao-G closed 3 years ago

Yihao-G commented 3 years ago

Separate icons into different modularised files. Just like lodash-es package.

This should help with the cases where (on modern browsers) using dynamic module import or using static module import without a bundler to reduce download size.

The documentation (README.md) has also been updated to reflect the changes.

This PR shouldn't cause breaking changes. I'm not guaranteed, but because the original module structure has not been changed (except the icons are just being imported from the corresponding individual files instead).

Templarian commented 3 years ago

You can leave out the commonjs files entirely as there is no reason to support them in this use case.

With that said this package has no plans to support native module imports at this time, but we may consider it as a separate package in the future. Really only aimed at package managers.

It's generally a good idea to open an issue with a spec proposal prior to submitting a PR. It's a nice change, just out of scope at this time.