Skip to content
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

Angular 12 Class constructor Control cannot be invoked without 'new' #473

Open
bobingham opened this issue Aug 1, 2021 · 2 comments
Open

Comments

@bobingham
Copy link

bobingham commented Aug 1, 2021

Reference this issue:
Class constructor Control cannot be invoked without 'new'

The only solution I could find is to downgrade the compilerOptions.target in my tsconfig.json file to "es5" from "es2017".
I'm not sure this is ideal, are there any plans to upgrade compiler options?

I am now getting the following message during compile:

(Component) depends on 'ol-layerswitcher'. CommonJS or AMD dependencies can cause optimization bailouts.

@walkermatt
Copy link
Owner

I'm wondering if it's time to publish the ESM module alongside the UMD bundle.

@bobingham
Copy link
Author

Hi Matt,
You're at a level of coding which I could only dream of.
Layer Switcher is a great addition to Open Layers and I think you for your efforts.
I am simply passing back what occurred during an upgrade from Angular 7 to Angular 12, any help would be greatly appreciated.
I try keep my console as clean as possible so spotted this during running ng-serve.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants