ol-layerswitcher
ol-layerswitcher copied to clipboard
Compile to ECMAScript
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.
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
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