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

change es2017 to es2022 in asset management guide #5935

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

srcrip
Copy link
Contributor

@srcrip srcrip commented Sep 20, 2024

es2022 is pretty safe now imo

@SteffenDE
Copy link
Contributor

I’d say the docs should follow what the generator generates:

~w(js/app.js --bundle --target=es2017 --outdir=../priv/static/assets --external:/fonts/* --external:/images/*),

So, either we change it in the generator templates as well, or we’ll keep it as is. Is there any notable improvement using the 2022 target instead of 2017, e.g. smaller bundle size?

@srcrip
Copy link
Contributor Author

srcrip commented Sep 21, 2024

Yes, I'd reccomend changing the generator too. I just missed that. I'll change my PR. As for improvements yes, there's a number of features that esbuild will convert to some kind of alternative if you specify a lower level, so the improvement would be using those native features + the bundle size would be slightly smaller cause esbuild doesn't need to provide it's own polyfills

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