I'm using r.js optimization with CDN assets set to :empty in the paths configuration. However, when I hit the optimized file, require is not fetching the CDN assets. Specifically it is not reaching out for jQuery. I'm also using the grunt requirejs task.
Here is my require.js config:
require.config({
paths: {
jquery :'//ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min'
}
});
And here is the grunt.js config:
requirejs: {
compile: {
options: {
baseUrl: "public/resources/javascripts/",
mainConfigFile: "public/resources/javascripts/main.js",
out: "public/resources/javascripts/main-build.js",
paths: {
'jquery': 'empty:'
},
name: "main",
generateSourceMaps: true,
optimize: "uglify2",
preserveLicenseComments: false
}
}
}
And I'm hitting the built asset as:
<script data-main="/resources/javascripts/main-build.js" src="/resources/javascripts/libs/require.js"></script>