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

Compile to ECMAScript #481

Open
Jalgoczy opened this issue Feb 1, 2022 · 2 comments
Open

Compile to ECMAScript #481

Jalgoczy opened this issue Feb 1, 2022 · 2 comments

Comments

@Jalgoczy
Copy link

Jalgoczy commented Feb 1, 2022

I am using the layerswitcher in an Angular SPA and it would be great if you could bump the code from CommonJS to ECMAScript.

Thank you.

@walkermatt
Copy link
Owner

Hi, are you referring to being able to import using ES Module syntax? If so that already possible, see https://github.com/walkermatt/ol-layerswitcher-examples/blob/master/parcel/main.js#L11

@Jalgoczy
Copy link
Author

Jalgoczy commented Feb 4, 2022

I am using the package in an Angular 13 App. At build time I got a warning that I am using a CommonJS library that can impact my bundle size. Maybe you can look at the documentation from Angular see:
https://angular.io/guide/build#configuring-commonjs-dependencies

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