Document Usage at Runtime
Opened this issue · 4 comments
vanthome commented
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(...)
).
HeinrichFilter commented
vanthome commented
Hi,
I had my config.js
it exactly as specified here:
https://github.com/HeinrichFilter/systemjs-plugin-googlemaps#systemjs-plugin-googlemaps
so yes.
HeinrichFilter commented
Can you please also send me the bundling command that you use?
vanthome commented
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
});
});