Google maps JS API in sage 9

Try to add 'window.google': 'google' here:

And google: 'google' here:

Untested, but I believe this should work.

Since the Google Maps JS API is being loading as an external dependency — not a standard Node module — you need to tell Webpack that it is external and you can then use the providePlugin to provide it to all your scripts.

2 Likes