walkermatt / ol-layerswitcher

Layer control for OpenLayers
MIT License
384 stars 176 forks source link

Compile to ECMAScript #481

Open Jalgoczy opened 2 years ago

Jalgoczy commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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