-
-
Notifications
You must be signed in to change notification settings - Fork 85
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
ES5 target support + Angular 10 Support #158
Comments
Hi, the lib does support es5, but angular 10 doesn't support it and always uses es2015 version of an imported lib. I spent around 2 weeks to determine a solution and failed with every idea. Feel free to try to fix it yourself, perhaps you'll find a working solution. The link you provided is E2E test, there's a version for es5 too: https://github.com/satanTime/ng-mocks/blob/83debd26ac89ed5ae5efb3c9be8ce7ad91ad6c64/e2e/a10es5ivy/.browserslistrc |
I can have a look when I find some time. |
During investigation, starting from angular 10 it ignores es5 build even it has been provided: https://github.com/ike18t/ng-mocks/blob/master/package.json#L5-L8. I think in your app dependencies don't extend code base built by es5 and es2015, in case of ng-mocks if a component was built as es2015 and ng-mocks was built as es5 then it throws an error that an instance can't be created without using Perhaps there's a way to downgrade to es5 not only the app itself, but also installed dependencies. Current solution is to change tsconfig.spec.ts to use es2015. |
Note: As an option to try: eval with detection of es6 classes. |
Hi, might you check that #161 works for you on es5? |
Hello,
This is the only library I encountered thus far that does not support ES5 target anymore..
Could it be because in https://github.com/satanTime/ng-mocks/blob/83debd26ac89ed5ae5efb3c9be8ce7ad91ad6c64/e2e/a10es2015ivy/.browserslistrc you excluded IE11?
Can we try and revisit this?
The text was updated successfully, but these errors were encountered: