Describe the bug
Currently the georaster-layer-for-leaflet package points to the minified file which includes pretty much all the dependencies (eg proj4, chromajs etc).
The minified files are handy for distributing a single file via a CDN. But it's not so good when importing packages which is how the bulk of apps are built these days - I think it's resulting in duplicate copies of libraries being included in an app because they won't be properly tree-shaken.
What I think needs to happen in the package.json is something like
"source": "src/georaster-layer-for-leaflet.ts", <--- although I think perhaps this needs culling
"main": "dist/georaster-layer-for-leaflet.bundle.js",
"module": "dist/georaster-layer-for-leaflet.js",
"type": "module",
"unpkg": "dist/georaster-layer-for-leaflet.min.js",
This should make for better usage downstream 🤞 .
Describe the bug Currently the georaster-layer-for-leaflet package points to the minified file which includes pretty much all the dependencies (eg proj4, chromajs etc).
https://github.com/GeoTIFF/georaster-layer-for-leaflet/blob/1b05e990ac333ae4f447a01dfe46da569b1eacaf/package.json#L5-L8
The minified files are handy for distributing a single file via a CDN. But it's not so good when importing packages which is how the bulk of apps are built these days - I think it's resulting in duplicate copies of libraries being included in an app because they won't be properly tree-shaken.
What I think needs to happen in the package.json is something like
This should make for better usage downstream 🤞 .