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

Build an ES6 module as well #134

Merged
merged 1 commit into from
Jul 9, 2021
Merged

Conversation

adroitwhiz
Copy link
Contributor

This is useful for people who are including filesize.js in their own projects using Rollup or some other bundler which supports ES6 modules.

I opted against transpilation with Babel--the use case for this is either that someone is using a bundler (and hence they can add their own transpilation step) or using it directly in a web browser which supports ES6 modules and hence also supports modern JS. As a consequence, this may be a breaking change (if package consumers are using module-aware bundlers, those bundlers will switch over to the non-transpiled module version by default). If desired, I can change it so that the default module is transpiled as well.

@avoidwork avoidwork merged commit 038bfab into avoidwork:master Jul 9, 2021
@avoidwork
Copy link
Owner

Thanks for the PR! I prefer what you did here from a packaging pov; this'll be a major bump due to the potential issue... and then we wait & see.

Repository owner deleted a comment from Parsenel Sep 9, 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.

2 participants