Split out types from @formatjs/intl-displaynames into a separate package #3177
ayhernandez-godaddy
started this conversation in
Ideas
Replies: 1 comment
-
so the real fix here is to add |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
For context, my team is a bit sensitive about our project's filesystem usage because the smaller we can keep our Docker image, the faster our builds and deploys tend to be. Our project's
node_modules
directory is usually the biggest contributor to disk usage, so we sometimes investigate if there are any opportunities to slim down our dependencies.I noticed that on
react-intl@5.20.10
, its total disk space usage (including all of its dependencies) is 15MB. I decided to investigate why that is, and found that the dependency on@formatjs/intl-displaynames
is itself 14MB. As far as I can tell from a code search,@formatjs/intl-displaynames
is only imported in two locations:Both of these imports appear to be used only for types. As I understand it,
@formatjs/intl-displaynames
is supposed to be an optional dependency that is only needed to polyfillIntl.DisplayNames
, and thus the actual code of that package isn't required byreact-intl
.I want to know if the maintainers would be open to the idea of splitting out the types into a separate package. Then, the bulk of the 14MB code can remain an optional polyfill dependency that doesn't need to be included in a project's filesystem that doesn't require that polyfill.
Beta Was this translation helpful? Give feedback.
All reactions