vue-azure-maps
vue-azure-maps copied to clipboard
Duplicate `azure-maps-control` dependencies
Our package.json includes both azure-maps-control and vue-azure-maps.
When inspecting our decency graph via "webpack bundle analyzer" I noticed that vue-azure-maps was quite sizable (larger than azure-maps-control even).
After digging into the files generated in the build for this project, it seems that azure-maps-control in it's entirety is included in the bundle.

My suspicion is that this is caused by import * as atlasJs from 'azure-maps-control/dist/atlas.min.js' in install.ts.
Why was this method of importing used vs import * as atlas from 'azure-maps-control'?
Additionally, the application imports azure-maps-control's CSS. Which results in duplicated CSS.
Any thoughts on this?
Vue 2 version of Vue Azure Maps imports the whole 'azure-maps-control' library, including the CSS. This is something that I already changed in the Vue 3 version (I have not made the Vue 3 version public yet, but I will as soon as I feel it's stable enough).
I do plan to add azure-maps-control as a peer dependency on the Vue 2 version and change the way global map options are handled. I've been too focused and busy at work, I've been postponing this breaking change for a while now, but I will try to publish this improvement on Saturday.
Ok, great! The change you are talking about on Saturday is the Vue 2 version, correct?
@maschill92 Correct!