Skip to content
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

ES Modules, but as a non-breaking change #194

Closed
wants to merge 2 commits into from
Closed

ES Modules, but as a non-breaking change #194

wants to merge 2 commits into from

Conversation

developit
Copy link

@developit developit commented Jun 7, 2019

My hope is that this represents a baby-step towards #150 that might be easier to merge, since it's not a breaking change. All of the files remain in-place, but the main module (index.js) also has an ES Modules version.

The effect this has is more visible when bundled via Webpack or Rollup, but here's the raw size improvement just looking at minified versions of master VS this PR:

Current Master After this PR Difference
339b 255b -84b / 25%

I know this seems like a small value! But for a module downloaded 3M times per month, that's quite a few bytes over the wire. It also helps ensure classnames gets concatenated effectively by Webpack and Rollup, which makes the module more likely to be moved into shared code chunks that avoid duplication.

/cc @JedWatson @Andarist

@Andarist
Copy link

Andarist commented Jun 8, 2019

@developit actually this might unfortunately break many people - webpack/webpack#7973 .

@FDiskas
Copy link

FDiskas commented Mar 17, 2021

This must be merged.

@Andarist
Copy link

@FDiskas there is nothing that "must" be done in open source.

@FDiskas
Copy link

FDiskas commented Mar 24, 2021

@Andarist this is likely unmaintained project. So we can mess around :) as we like

@remcohaszing remcohaszing mentioned this pull request Apr 5, 2021
@dcousens
Copy link
Collaborator

dcousens commented Jun 22, 2021

Merged #243 instead

@dcousens dcousens closed this Jun 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants