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

Raise the cjs and esm target to es6 #962

Closed
wesgro opened this issue Oct 12, 2022 · 0 comments · Fixed by #963
Closed

Raise the cjs and esm target to es6 #962

wesgro opened this issue Oct 12, 2022 · 0 comments · Fixed by #963

Comments

@wesgro
Copy link
Contributor

wesgro commented Oct 12, 2022

New Features

The ESM and CJS targets use es6 instead of es5

All evergreen browsers fully support the ES6 spec (Even Safari as of Safari 10)

Generating ES5 compliant code introduces unnecessary feature polyfills that can bloat bundles and possibly create warnings in rollup (no top level this for example).

What is the new or updated feature that you are suggesting?

Change the target properties for the CJS and ESM builds to use es6 instead of es5

Why should this feature be included?

Since this library supports React 18 and React 18 no longer supports IE 11 this seems like a good time to raise the floor of the non-ESNext generated code.

If users of this library need to support IE 11 still they can always include this library in their babel config to transpile it down to whatever ES version they need to support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant