How to run an angular app in IE?
Getting a white page on your IE screen? Worry not!!!
We will follow the following steps to run the app on dev:
- Uncomment few imports in the pollyfills.ts file.
- Install few npm packages
- Modify the browserslist file
- Modify tsconfig.json file
Install npm packages
You need to install the npm packages which we just un-commented by running the following two commands.
Modify the browserslist file
You will find this file inside the root of the project. The default browserslist file is something like this:
You need to remove the ‘not’ from the last line which will look like this,
Modify tsconfig.json file
You will find this file inside the root of the project. The default tsconfig.json is something like this.
Internet Explorer doesn’t automatically generate the ES5 bundle. So we need to change the target to :
Now run the ng serve command and here you go. You will see the application running successfully on internet explorer.
You can skip the last step if you want to run on production ( ng build — prod).
Thank you ✨✨
Happy coding !!