Skip to content

'let' instead of 'var' in ES5 bundles #17735

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

Closed
javiermarinros opened this issue May 15, 2020 · 6 comments · Fixed by #17749
Closed

'let' instead of 'var' in ES5 bundles #17735

javiermarinros opened this issue May 15, 2020 · 6 comments · Fixed by #17749
Labels
Milestone

Comments

@javiermarinros
Copy link

The Angular CLI generated ES5 bundles fails in old ES5 browsers because it's using let instead of var in source code areas related to localization and i18n using Angular + Angular CLI 9.1.7

Steps to reproduce:

ng new test
ng add @angular/localize
set "localize": true in angular.json
ng build
check generated vendor-es5.js file and look for the string let

@petebacondarwin
Copy link
Contributor

This should have been fixed by #17625

@petebacondarwin
Copy link
Contributor

But it only landed on master so will only take effect in v10.0.0...

@petebacondarwin
Copy link
Contributor

Perhaps you could try updating CLI to v10.0.0-next.5?

@javiermarinros
Copy link
Author

For now I'm manually replacing 'let' with 'var' before deploying to production and it works, I'll try CLI v10

@ngbot ngbot bot modified the milestone: Backlog May 18, 2020
filipesilva pushed a commit that referenced this issue May 18, 2020
Locale data is now transformed to be compatible with the ECMAScript level of the application bundles.  The locale data is also optimized to remove comments and unnecessary whitespace.

Fixes: #17497 and Fixes: #17735
@alan-agius4
Copy link
Collaborator

Closed via #17749

@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 Jun 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants