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
Describe the bug
I try to build a prod build of my application with an optimized frontend bundle. But when i do that i receive the following error in the browser console, no map is drawn and all subsequent calls to leaflet fail: ReferenceError: L is not defined
On dev builds and prod builds with optimizeBundle = false everything works as expected though.
In your sample application i see that you also have optimizeBundle = false but IMO that does not sound like a great idea for a prod application.
But maybe I'm just missing something obvious which applies to addons in general (this is the only third party addon i use)?
I'm using Vaadin 24.4.3 and vcf-leaflet 2.0.1.
To Reproduce
Steps to reproduce the behavior:
build a vaadin application with vcf-leaflet in prod and with optimizeBundle = true
open the application in a browser and open the console
Expected behavior
The application can be built for prod with optimizeBundle = true.
Desktop (please complete the following information):
OS: Arch Linux (Endeavour OS)
Browser: Firefox, Chromium
Version: Vaadin: 24.4.3, vcf-leaflet: 2.0.1
Thx a lot for your work!
The text was updated successfully, but these errors were encountered:
Ok i pinned it down to the creation of a MarkerClusterGroup. If this class is instantiated in the code it throws the error. Without any plugins, the map works fine on prod builds with optimizeBundle set to true. Whether other plugins are affected as well or not, i cannot tell as currently I'm only using the markercluster plugin.
As this is a rather hacky solution IMO i leave this issue open as IMO this should be fixed in this project.
Sadly i have no clue where that would go here so i cannot create a PR for this.
If anyone has an idea where such an import would need to go in this project I'd be happy for a hint so i (or someone else) could file a PR.
Describe the bug
I try to build a prod build of my application with an optimized frontend bundle. But when i do that i receive the following error in the browser console, no map is drawn and all subsequent calls to leaflet fail:
ReferenceError: L is not defined
On dev builds and prod builds with
optimizeBundle = false
everything works as expected though.In your sample application i see that you also have
optimizeBundle = false
but IMO that does not sound like a great idea for a prod application.But maybe I'm just missing something obvious which applies to addons in general (this is the only third party addon i use)?
I'm using Vaadin
24.4.3
and vcf-leaflet2.0.1
.To Reproduce
Steps to reproduce the behavior:
optimizeBundle = true
Expected behavior
The application can be built for prod with
optimizeBundle = true
.Desktop (please complete the following information):
24.4.3
, vcf-leaflet:2.0.1
Thx a lot for your work!
The text was updated successfully, but these errors were encountered: