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

fix(@angular-devkit/build-angular): prefer ES2015 entrypoints when application targets ES2019 or lower #22305

Merged
merged 1 commit into from
Dec 8, 2021

Conversation

alan-agius4
Copy link
Collaborator

@alan-agius4 alan-agius4 commented Dec 6, 2021

Previously, we always consumed the ES2020 entrypoints, which caused issues in environments where the application compilation target is ES2019 or lower and ES2020 is not supported.

This is because we only downlevel code when we target ES5 or below.

  • ES5 or below compilations, ES2015 entrypoints are used and their code is downlevelled to ES5.
  • ES2019 or below, ES2015 entrypoints are used and no downlevelling is involved.
  • ES2020 or later, ES2020 entrypoints are used.

Closes #22270

@destus90
Copy link
Contributor

destus90 commented Dec 6, 2021

@alan-agius4
Is there a typo in the commit description?

no downloading is involved.

@alan-agius4
Copy link
Collaborator Author

alan-agius4 commented Dec 6, 2021

Yeah, that should be downlevelling, thanks for pointing it out.

…plication targets ES2019 or lower

Previously, we always consumed the ES2020 entrypoints, which caused issues in environments where the application compilation target is ES2019 or lower and ES2020 is not supported.

This is because we only downlevel code when we target ES5 or below.

- ES5 or below compilations, ES2015 entrypoints are used and their code is downlevelled to ES5.
- ES2019 or below, ES2015 entrypoints are used and no downlevelling is involved.
- ES2020 or later, ES2020 entrypoints are used.

Closes #22270
@alan-agius4 alan-agius4 added the action: merge The PR is ready for merge by the caretaker label Dec 6, 2021
@alan-agius4 alan-agius4 merged commit 562dc6a into angular:master Dec 8, 2021
@alan-agius4 alan-agius4 deleted the entry-points branch December 8, 2021 07:33
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jan 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Some unsupported code with es2015 target set
3 participants