-
Notifications
You must be signed in to change notification settings - Fork 12k
IE11 error when build with production option #14777
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
Comments
This seems like a bug but we'll need to look at a reproduction to find and fix the problem. Can you setup a minimal repro please? You can read here why this is needed. A good way to make a minimal repro is to create a new app via This might be related to your directory structure so its really important to get an accurate repro to diagnose this. |
Hi , I've uploaded app on GitHub. Thanks! |
Hi, I want to start contributing. If nobody else is working on it, I would like to take this up. |
The same for me. Vendor chunk in |
Hi all, I have looked at this and the problem is that scripts will be minified with terser ECMA 6 which causes compatible syntax generation for IE var r = (e[i] = { i, l: !1, exports: {} }); instead of var r = (e[i] = { i: i, l: !1, exports: {} }); I have some ideas how to solve this, I will be exploring them in the coming days. |
The root problem is that we There are a couple of possible solutions to this problem.
I am going to mark this as |
Thanks for the support! |
Discussed and opted to invert the builds for now. |
…d differential loading Invert the builds so that es2015 scripts output don't override the es5 version. Fixes #14777
I am not sure how this ticket was closed without anybody even confirming that it's now working. I have tried this with the latest release and I still cannot get a basic "ng new my-app" to run in IE11. It doesn't matter if I use ng serve or ng build --prod neither results in anything that works in IE11. The only difference I can see now from before the latest 8.1.0 release is that now there are no errors appearing in the console. However, the app still does not load and I am just left with a blank white screen. |
@alan-agius4 can you take a look again with 8.1.0 please? |
Works for me, thanks. |
@varolo Would you mind attaching your package.json so I can see what is different with mine. I have created a new ng app and double checked all my package versions and I still cannot get this to run in IE11 https://github.com/AaronMorse/ie11-basic-new If I run "ng version" I have the following: @angular-devkit/architect 0.801.0 |
After "ng update" on repro-app linked above, I have this package.json :
and that's my ng version result :
The error in the IE11 console is disappeared. |
Hi @varolo, Thanks so much for the response. Much appreciated. I still can't for the life of me get anything to run under IE11. I have taken your Repro-App and run ng update and now my package.json is identical to your latest one and yet I still just get a blank page in IE. The console errors have gone but the page still doesn't load. The only other difference I can see is your node version is newer. I am only on 10.16. I am going to try now to upgrade my node and see if that somehow has something to do with it. Regards, |
Hi @AaronMorse ,you're welcome. You can't run anything in IE11 using "ng serve" to host the application locally or your problems are related only to "ng build" when you try to deploy your application? |
Are you using “ng serve” or “ng build” to try your application? “ng serve” is designed for development related activities and is intended to be used with modern browsers. Such browsers provide the built-in development tools to support active development and optional integration with a developer’s IDE. Also, to reduce development round trip time, differential loading is disabled with “ng serve”. |
I have been using "ng serve" for the sample app I attached, however, I did build my proper app using "ng build --prod" and got the same result. |
Perhaps then my issue is unrelated to this ticket as the initial syntax error in main.js is no longer showing in the console. |
Has the “browserslist” file been configured to represent the required list of browsers for the application? Also, can you provide the output “index.html” for the broken app (to ensure both types of scripts are being properly injected)? |
Seems my "browserslist" file was not configured correctly. Apologies for the run-around. Works fine now. |
Not a problem. I’m glad you were able to |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
🐞 Bug report
Command (mark with an
x
)Is this a regression?
The previous version in which this bug was not present was: 7
Description
When I build the project in production mode using following command:
ng build --prod --aot --output-hashing=all
there is an error in IE11 console and the app do not work properly.
The error is not present if I remove the --prod option as follow:
ng build --aot --output-hashing=all
🔥 Exception or Error
In the Internet Explorer 11 console:
🌍 Your Environment
ng version
package.json
The text was updated successfully, but these errors were encountered: