Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Router not working in IE 11, when serving ssr build #526

Closed
prosto-artem opened this issue Jan 11, 2018 · 2 comments
Closed

Router not working in IE 11, when serving ssr build #526

prosto-artem opened this issue Jan 11, 2018 · 2 comments

Comments

@prosto-artem
Copy link

prosto-artem commented Jan 11, 2018

Today i've faced a problem.
I was testing my webapp on angular, and findout that routing on ie11, is just not working at all for in project.
And the most confusing part that, when i just start the project using 'npm run start' everything works like a charm, but if making a build and then trying to use it (npm run build:ssr -> npm run serve:ssr), thats the place, where i'm facing troubles.
I've already installed recommended polyfills, put recommended meta tags in my index file, but still can't determine the reason why its not working proprely.

"dependencies": { "@angular/animations": "^5.0.0", "@angular/common": "^5.0.0", "@angular/compiler": "^5.0.0", "@angular/core": "^5.0.0", "@angular/forms": "^5.0.0", "@angular/http": "^5.0.0", "@angular/platform-browser": "^5.0.0", "@angular/platform-browser-dynamic": "^5.0.0", "@angular/platform-server": "^5.0.0", "@angular/router": "^5.0.0", "@ng-bootstrap/ng-bootstrap": "^1.0.0-beta.7", "@nguniversal/express-engine": "^5.0.0-beta.5", "@nguniversal/module-map-ngfactory-loader": "^5.0.0-beta.5", "classlist.js": "^1.1.20150312", "core-js": "^2.4.1", "ng2-ckeditor": "^1.1.13", "ng2-select": "^2.0.0", "raven-js": "^3.21.0", "rxjs": "^5.5.2", "underscore": "^1.8.3", "zone.js": "^0.8.14" }, "devDependencies": { "@angular/cli": "^1.5.0", "@angular/compiler-cli": "^5.0.0", "@angular/language-service": "^5.0.0", "@types/node": "^8.0.30", "cpy-cli": "^1.0.1", "express": "^4.15.2", "http-server": "^0.10.0", "reflect-metadata": "^0.1.10", "ts-loader": "^2.3.7", "typescript": "~2.4.2" }

`/** IE9, IE10 and IE11 requires all of the following polyfills. **/
import 'core-js/es6/symbol';
import 'core-js/es6/object';
import 'core-js/es6/function';
import 'core-js/es6/parse-int';
import 'core-js/es6/parse-float';
import 'core-js/es6/number';
import 'core-js/es6/math';
import 'core-js/es6/string';
import 'core-js/es6/date';
import 'core-js/es6/array';
import 'core-js/es6/regexp';
import 'core-js/es6/map';
import 'core-js/es6/weak-map';
import 'core-js/es6/set';

/** IE10 and IE11 requires the following for NgClass support on SVG elements */
import 'classlist.js'; // Run npm install --save classlist.js.

/** Evergreen browsers require these. **/
import 'core-js/es6/reflect';
import 'core-js/es7/reflect';
`

UPDATE

figure it out, its because my main.bundle.js have multiple 'use strict' inside, and IE 11 has a problem with that.
Does anyone know , is there a convenient way to remove 'use strict' from bundle, after it was generated?
for example for babel there is a package which clearing them "babel-plugin-transform-remove-strict-mode"

@prosto-artem
Copy link
Author

problem was a duplicate object property in one of my components

@pks90
Copy link

pks90 commented Jul 5, 2019

problem was a duplicate object property in one of my components

what do you mean by duplicate object property ? The same is the problem I am facing right now, not sure what's wrong here, nothing in the console too.

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