Load jquery from CDN with fallback fixes on optimized requireJS

I want to load jquery from CDN with local backup.

It's pretty simple, if you look on stackoverflow I found this informative question about the problem.

But when I optimize the code for production, jQuery is part of the optimized code that defeats the purpose of loading jQuery through a public CDN.

What are the solutions to this problem?

+3


source to share


1 answer


One way is to exclude it from your build. Use the config optionexclude



https://github.com/jrburke/r.js/blob/master/build/example.build.js#L352

+2


source







All Articles