I am using the goog
plugin for requirejs like this:
define(['underscore', 'backbone', 'marionette', 'goog!visualization,1,packages:[geomap]'],
function(_, Backbone, Marionette) {
...
});
The code works fine until I build the project using grunt (grunt build
). When I run the built code, I get Uncaught ReferenceError: google is not defined
error. My Gruntfile.js includes this:
requirejs: {
build: {
options: {
baseUrl: "js/",
optimizeCss: 'none',
mainConfigFile: "js/app.js",
name: "../bower_components/almond/almond",
out: "build/js/app-built.js",
include: ["app"]
}
}
},
I tried adding the pluging to the include
part but no luck. Is there a way to fix it?