Open
Description
I have a Vue app which I am bundling using Electron into a Windows exe.
For a number of years the following code has worked. Recently is has stopped with an Unexpected token error when calling this.loader.load()
Note, this code works when I run it in the browser. It does not work when I run it using Electron (both using electron:serve and electron:build).
I've upaded to "@googlemaps/js-api-loader": "^1.16.6" and still the same. Previously I was using "^1.12.1".
Does anyone have an ideas how I can get it working again?
this.loader = new Loader({
apiKey: "...",
version: "weekly",
libraries: ["places"]
});
this.mapOptions = {
mapId: "54a1eec626be752c",
disableDefaultUI: true,
zoom: this.ZOOM,
zoomControl: true,
center: this.CENTER,
backgroundColor: '#9bbff4'
};
this.loader.load().then((google) => {
this.google = google
this.map = new google.maps.Map(document.getElementById("map"), this.mapOptions);
this.geocoder = new google.maps.Geocoder();
})