-
Notifications
You must be signed in to change notification settings - Fork 12k
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
ng serve/test/e2e does not work with Internet Explorer 11 #14455
Comments
Hi, thanks for reporting this. However this is now by design in version 8. By default in version 8 we enable differential loading for There are a couple of options that you can do if you want to have ES5 code during serve. 1. Disable differential loading completely, (Not recommended) 2. Have multiple configurations for serve. Create a new tsconfig {
"extends": "./tsconfig.app.json",
"compilerOptions": {
"target": "es5"
}
} In your "build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
...
},
"configurations": {
"production": {
...
},
"es5": {
"tsConfig": "./tsconfig-es5.app.json"
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
...
},
"configurations": {
"production": {
...
},
"es5": {
"browserTarget": "app:build:es5"
}
}
}, You can then run the serve with this configuration using the below command. ng serve --configuration es5 |
While that is a "workaround" for now, home come the CLI can't do differential loading in serve mode also, so the application at least behaves the same for both prod and non-prod? |
Workaround not working for me when running I ran |
Try |
Coming from #14656 here 😄, I have one last question: Why differential loading has only been implemented for For now and for me the only viable option is to switch from EDIT: crap even that is not working, as |
From what I can see of the new differential build, the process is effectively done twice. i.e. once for |
@ciesielskico You are mixing up the |
The manual steps required to update the multiple files bothered me and I didn't want to repeat it 20+ times this year for all our new projects so I created a npm Dev dependency to automate the workaround config updates. You can find it here : https://github.com/ChrisMeeusen/ng-ie-serve. Cheers. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Also situation with 'ng test' on IE11/PhantomJS is totally diferent it seems, as even after setting target to 'es5' in tsconfig it doesn't work correctly, due to missing polyfils, as said in my issue: #14691 |
Is it possible to document this better please? seems a good angular.io place which is woefully misleading. If I remember the generation of the es5 polyfill file was automatic in beta - now we have some extra recommended steps which are undocumented. |
@alan-agius4 can we think about the possibility of adding an option in the cli menus? to ask if we want IE support for For me it makes it boring and it's waste! to do this manually each time i create a project Hope you do something (lean) about it, Angular Team. |
Why not just add the start:es5 to the angular.json and package.json file and then a user could choose run it or not |
workaround is not working for me. I am getting below error SCRIPT1046: Multiple definitions of a property not allowed in strict mode |
@sandipsrane, did you enable ie mode in the browserlist file |
@ricardosaracino I did after your response but same result.. |
@sandipsrane, have you tried just using this : https://github.com/ChrisMeeusen/ng-ie-serve It should just make all the changes for you. Install it, run it, and move on. |
@ChrisMeeusen it is giving me below error |
@sandipsrane Sorry there was an issue with the package and bin command setup. Please install version 1.0.1 and kick the tires. Thanks for letting me know about the issue. |
@sandipsrane created an issue here as to not pollute this thread. I'm working on a fix for this. |
Options mentioned above are working now. It was not working because Ivy was enabled in tsconfig.app.json. After making it false it started working. "angularCompilerOptions": { |
shouldn't it read and I think it is worth pointing out that in {
"browserTarget": "app:build:es5"
} "app" should be replaced by the actual app name (actual key value used under "project" key) |
@chintandalwadiwk |
Hello, We had the issue too while migrating as we have to support IE10-IE11. I have followed the instructions here and read other related threads and that helped fixing the script issues and supporting IE for local dev testing (ng serve) but there is still a issues in rendering. Could be related to flex / break-points calculations . We use Material with Bootstrap grid for layout (only grid, not full Bootstrap) and nothing really special aside of that. Is there a way to find what polyfill where removed that could affect css and such? I will try to compare the runtime of our older 7.x build where everything worked just fine (without anything extra in the polyfill file) but I would gladly take any hint. Using localhost, I see that style.js have no es5 variant (like we can see in this work in progress document update : https://pr31262-14beff1.ngbuilds.io/guide/deployment), could be a hint? |
If this can be usefull to someone else, my coworker was able to figure it out.
Some more testing required but it seem to be fine now. |
Did you resolve this issue? Same have. IE-11, and I checked what not compatibility mode. I got "Object doesn't support property or method 'values'" error in infinity cycle. It looks like file with polyfills is not completed, without Object.values and other features. How I can complete polifills file in Angular 8? resolved: I added in polyfills.ts |
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?
Yes, the previous version in which this bug was not present was: 7.xDescription
A clear and concise description of the problem...Internet Explorer 11 does not load site when using ng serve.
Only errors in the dev console.
🔬 Minimal Reproduction
ng new ienotworking
ng serve
or
ng serve --prod
🔥 Exception or Error
🌍 Your Environment
Anything else relevant?
IE11 only.
The text was updated successfully, but these errors were encountered: