You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In perliedman/leaflet-routing-machine#446, it was reported that the size of Leaflet Routing Machine ends up very large, and examining this it turns out that the languages from osrm-text-instructions are a major part of that (at least over 80%).
Since a lot of applications will never use more than one language, I can see that this is not ideal.
A lot of other libraries use an opt-in mechanism for languages you need to support, rather than always bundling all of them, which could be one idea to approach this.
Is this something you have thought about? I tried to look for some info on how to exclude languages but didn't find anything, sorry if I missed something obvious.
The text was updated successfully, but these errors were encountered:
Manually delete language files pre-bundling from node_modules
Loading language files on-demand in the client might be another solution. This breaks osrm-text-instructions being self-contained though, since the language files need to be served out-of-bounds though.
Ok, good to know. I'll think about this for a while.
My main concern is that most users of Leaflet Routing Machine (that I hear from) use the pre-built plugin, where it's already too late to exclude the files. Also, I'd prefer to not have to instruct people on how to use their bundlers 😛, but I see your point about the module being self-contained.
In perliedman/leaflet-routing-machine#446, it was reported that the size of Leaflet Routing Machine ends up very large, and examining this it turns out that the languages from
osrm-text-instructions
are a major part of that (at least over 80%).Since a lot of applications will never use more than one language, I can see that this is not ideal.
A lot of other libraries use an opt-in mechanism for languages you need to support, rather than always bundling all of them, which could be one idea to approach this.
Is this something you have thought about? I tried to look for some info on how to exclude languages but didn't find anything, sorry if I missed something obvious.
The text was updated successfully, but these errors were encountered: