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

Prefer more descriptive esm word instead of es #2641

Merged
merged 1 commit into from
Jul 23, 2018
Merged

Prefer more descriptive esm word instead of es #2641

merged 1 commit into from
Jul 23, 2018

Conversation

TrySound
Copy link
Contributor

es has different meanings. Some call it es5+ syntax or just es6.
There is a precedent of using es for untranspiled code in
materia-ui.

In this diff I propose to rename es to esm as a shorthand for
ES Modules.

jsnext:main is deprecated in rollup community (it came from rollup and
dead in it) and shouldn't be used anymore. module is enabled by
default like in webpack.

@gwyneplaine gwyneplaine added the v2 label Jul 4, 2018
@jossmac
Copy link
Collaborator

jossmac commented Jul 4, 2018

Hi @TrySound,

Any chance you could separate this into two PRs -- one with the tidy up, and one with the proposed breaking change?

@TrySound
Copy link
Contributor Author

TrySound commented Jul 5, 2018

I will, sure

@jossmac
Copy link
Collaborator

jossmac commented Jul 6, 2018

Awesome, thank you!

@TrySound TrySound mentioned this pull request Jul 8, 2018
@TrySound
Copy link
Contributor Author

TrySound commented Jul 8, 2018

I will rebase after that PR get merged

jossmac pushed a commit that referenced this pull request Jul 10, 2018
@TrySound TrySound mentioned this pull request Jul 11, 2018
es has different meanings. Some call it es5+ syntax or just es6.
There is a precedent of using `es` for untranspiled code in
[materia-ui](https://unpkg.com/@material-ui/core@1.0.0/es/).

In this diff I propose to rename `es` to `esm` as a shorthand for
ES Modules.

`jsnext:main` is deprecated in rollup community (it came from rollup and
dead in it) and shouldn't be used anymore. `module` is enabled by
default like in webpack.
@JedWatson
Copy link
Owner

@TrySound thanks for the input to react-select 🙂

Thought quite a bit about this and on balance I'm happy to go with your suggestion. It's a breaking change for anyone including the .es.js file directly from a cdn (is that a thing?), so I'm bundling it in with the final 2.0.0 release.

On a related note, I've been thinking quite a bit on how we could optimise react-select's bundle size for consumers... if you have any ideas on that or are interested in collaborating, please let me know!

@JedWatson JedWatson merged commit 7567283 into JedWatson:v2 Jul 23, 2018
@TrySound
Copy link
Contributor Author

Sure, I could help

@TrySound TrySound deleted the es-to-esm branch September 21, 2018 07:15
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