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

experiment with babel-preset-env #3615

Closed
outofambit opened this issue Mar 17, 2019 · 0 comments · Fixed by #3644
Closed

experiment with babel-preset-env #3615

outofambit opened this issue Mar 17, 2019 · 0 comments · Fixed by #3644

Comments

@outofambit
Copy link
Contributor

outofambit commented Mar 17, 2019

I'd like to explore using babel-preset-env to allow us to consistently support a range of browsers while using whatever ES features we'd like.

I'm not sure how this will impact the bundle size, so I'm going to look into that first.

(builds on #3431)


There's a lot of other things we could have babel do, but I think the strongest case for babel in p5js is to ensure backward compatibility with older browser versions (or ones that are the minority in not supporting an ES syntax/feature) using babel-preset-env.

Supporting a range of browsers is much easier with babel-preset-env. When added to your build process, it will polyfill and transpile your javascript to work on the browser versions listed in a configuration file (which we maintain as part of our repo). It's super cool and would allow us to embrace whatever features of es6+ we find appropriate without limiting the library's (browser) reach.

Originally posted by @outofambit in #3425 (comment)

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

Successfully merging a pull request may close this issue.

1 participant