Angular 9 for Internet Explorer 11 dont work vendor.js compile error
See original GitHub issueBug Report or Feature Request (mark with an x
)
- [ ] Regression (a behavior that used to work and stopped working in a new release)
- [x ] Bug report -> please search issues before submitting
- [ ] Feature request
- [ ] Documentation issue or request
I use “ng2-pdf-viewer”: “^6.3.0” and upgraded my project to “@angular/core”: “^9.1.9”, In Chrome i have no Problems but when I try to compile the project in es5 and start IE11 locally I get a error from the vendor.js
SCRIPT1010: Indentifier expected
vendor.js (158998,9)
{
const { <--- Breaks here
isNodeJS
} = __w_pdfjs_require__(7);
if (isNodeJS) {
const PDFNodeStream = __w_pdfjs_require__(19).PDFNodeStream;
pdfjsDisplayAPI.setPDFNetworkStreamFactory(params => {
return new PDFNodeStream(params);
});
} else {
const PDFNetworkStream = __w_pdfjs_require__(22).PDFNetworkStream;
let PDFFetchStream;
if (pdfjsDisplayDisplayUtils.isFetchSupported()) {
PDFFetchStream = __w_pdfjs_require__(23).PDFFetchStream;
}
pdfjsDisplayAPI.setPDFNetworkStreamFactory(params => {
if (PDFFetchStream && pdfjsDisplayDisplayUtils.isValidFetchUrl(params.url)) {
return new PDFFetchStream(params);
}
return new PDFNetworkStream(params);
});
}
}
Has anybody an idea what the problem is?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:12
Top Results From Across the Web
Vendor.js throwing syntax error for ng-idle library for IE 11
js file while running angular 9 application in IE 11. I've enabled all the polyfills and changed the target to "es5" in tsconfig.json...
Read more >Browser support - Angular
Angular is built on the latest standards of the web platform. Targeting such a wide range of browsers is challenging because they do...
Read more >Angular < 13: How to support IE11 - DEV Community
In this article I will show you the steps I took to support Internet Explorer 11 with Angular. The first half of this...
Read more >How To Fix Your Angular App When It's Not Working in IE11
Sometimes, your application may throw errors in IE11, even when it is working fine in other browsers. There can be numerous reasons why...
Read more >IE doesn't work after Angular 9 update : r/Angular2 - Reddit
js '; // Run npm install --save classlist.js. /** Evergreen browsers require these. **/ import 'core-js/es/reflect'; import 'core-js/proposals/ ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Add below package
Set worker js in App component (<any>window).pdfWorkerSrc = ‘./scripts/pdf.worker.js’; Do not use above code to load worker. It will create performance issue to navigate pdf pages. User below (window as any).pdfWorkerSrc = import(‘pdfjs-dist/webpack’);
It works for me without any problems! Thanks!!!