ol-layerswitcher icon indicating copy to clipboard operation
ol-layerswitcher copied to clipboard

Compile to ECMAScript

Open Jalgoczy opened this issue 3 years ago • 2 comments
trafficstars

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.

Jalgoczy avatar Feb 01 '22 07:02 Jalgoczy

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

walkermatt avatar Feb 01 '22 20:02 walkermatt

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

Jalgoczy avatar Feb 04 '22 08:02 Jalgoczy