About half of the scripts that I use are on CDN and the other half are on the same server as the app. I don't know what to optimize in this case. Can somebody suggest?
Asked
Active
Viewed 19 times
1 Answers
0
Yes, r.js optimizer cannot load network resources so you don't even have much choice. In your build profile you'll need to replace the path mappings with "empty:"
, as per the example:
({
baseUrl: ".",
name: "main",
out: "main-built.js",
paths: {
jquery: "empty:"
}
})
This way both development and minified version of your application will use the CDN version of jquery
dependency.

kryger
- 12,906
- 8
- 44
- 65