HeinrichFilter/systemjs-plugin-googlemaps

Document Usage at Runtime

Opened this issue · 4 comments

The example in the documentation shows how to use the load during development. But what about runtime?
I tried like this:

import GoogleMaps from 'google-maps';

But then I get an error during bundling:

TypeError: Global SFX bundle dependency "google-maps" must be configured to an environment global via the globalDeps option.

Also I don't know how it can be used on an async manner (then(...)).

Hi @vanthome

What command do you use to bundle?

Do you have "build": false set?

Hi,

I had my config.js it exactly as specified here:

https://github.com/HeinrichFilter/systemjs-plugin-googlemaps#systemjs-plugin-googlemaps

so yes.

Can you please also send me the bundling command that you use?

Sure, I'm using the JSPM Dev Builder and this is my gulp task to bundle:

  var jspm = require('jspm');
  var builder = new jspm.Builder();
  useProductionVersion(builder);
  return builder.loadConfig('./app/config.js')
    .then(function() {
      return builder.buildStatic('boot', 'dist/app.min.js', {
        sourceMaps: false,
        minify: true,
        mangle: true
      });
    });