darekf77 / ng2-logger

Isomorphic logger for Browser and NodeJS, ( typescript / javascript ) apps
MIT License
61 stars 17 forks source link

ng2-logger not working in lazy loading sub-module IE 11 (Angular8) #49

Closed kliarist closed 4 years ago

kliarist commented 4 years ago

We are using "ng2-logger": "~3.0.11" and while it seems to be working fine for all browsers and submodules (Angular lazy loading) it wont work in IE11 and in particular for lazy loaded modules (it works for top level modules). Attached is the exception. Do you happen to have any idea what might be wrong ? image

darekf77 commented 4 years ago

@kliarist I am currently testing and rewriting my libraries to be compatible with new angular 9.

By reading your browser errors log I am not sure what exactly happen.. but try to import es5 version or downgrade ng2-logger to version 2.x.x.


 - to use old version in your **package.json** change:

"ng2-logger": "^2.0.48"

kliarist commented 4 years ago

I ended up using "ng2-logger": "~3.0.11", and importing

import { Log, Level } from 'ng2-logger/browser/es5' as advised. It seems to be working fine with IE11

Many thanks!