You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment, a dictionary object is exported in the generated JS module that maps the old classname with the generated one. Unfortunately, this prevents mangling those keys, as it's not guaranteed that they change during runtime (although it's reasonable to assume they won't).
We can solve this by exporting each of those classnames as a module export. Obviously, there's a problem with classnames with hyphens, so I definitely see this as a disabled-by-default configuration flag that would just throw with an informative message if it encounters classnames with dashes in them.
Feature Use Case
Reduces bundle size and memory consumption. A quick experiment showed a reduction of 11Kb in my project.
Happy to work on a PR if this seems useful.
The text was updated successfully, but these errors were encountered:
First of all, thanks for fixing #424!
Feature Proposal
At the moment, a dictionary object is exported in the generated JS module that maps the old classname with the generated one. Unfortunately, this prevents mangling those keys, as it's not guaranteed that they change during runtime (although it's reasonable to assume they won't).
We can solve this by exporting each of those classnames as a module export. Obviously, there's a problem with classnames with hyphens, so I definitely see this as a disabled-by-default configuration flag that would just throw with an informative message if it encounters classnames with dashes in them.
Feature Use Case
Reduces bundle size and memory consumption. A quick experiment showed a reduction of 11Kb in my project.
Happy to work on a PR if this seems useful.
The text was updated successfully, but these errors were encountered: