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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Angular 8 breaks legacy scripts #30759

Closed
mpgo13 opened this issue May 31, 2019 · 3 comments
Closed

Angular 8 breaks legacy scripts #30759

mpgo13 opened this issue May 31, 2019 · 3 comments

Comments

@mpgo13
Copy link

mpgo13 commented May 31, 2019

馃悶 bug report

Is this a regression?

Yes, the previous version in which this bug was not present was: Angular 7.x

Description

Now with differential loading, angular runs all code within es6 modules in modern browsers. This breaks apps using legacy scripts (non es6 modules compatible).

馃敩 Minimal Reproduction

  1. git clone https://github.com/mpgo13/angular8-breaks-legacyscripts.git
  2. cd angular8-breaks-legacyscripts
  3. ng build && (cd dist/repro-app && python -m SimpleHTTPServer)
  4. Browse to http://localhost:8000

Expected result:

  • No script error

Actual result:

  • Script error

UPDATE: Note: Works with ng serve as scripts are not loaded as es6 modules in that case.

@mpgo13
Copy link
Author

mpgo13 commented May 31, 2019

I guess this was not meant to work or supported in Angular < 8.0.0 anyway. Legacy library has been replaced in our project. Feel free to close issue.

@gkalpak
Copy link
Member

gkalpak commented May 31, 2019

You could also set target to es5 in your tsconfig.json file to avoid that.

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

No branches or pull requests

2 participants