I was facing issues after upgrading to jQuery 2.0 My application stopped working on IE8 and less. The application currently use Require.JS to modularise my code.
I found a very nice solution here for conditional check of the browser. But my application also uses optimisation described here for minifying the code. So I have an app.build.js which looks like the following:
({
appDir: '../',
baseUrl: 'js/',
dir: '../../v3-build',
locale: 'en-us',
paths: {
'modernizr': 'libs/modernizr-2.5.3',
'jQuery': 'libs/jquery/jquery-2.0.0',
'underscore': 'libs/underscore-1.4.4',
'backbone': 'libs/backbone-0.9.9',
'bootstrap': 'libs/bootstrap/bootstrap'
// Application - bootstrap for frontend app
'application': 'application'
},
shim: {
'jQuery': {
exports: '$'
},
'underscore': {
deps: ['jQuery'],
exports: '_'
},
'backbone': {
deps: ['jQuery', 'underscore'],
exports: 'Backbone'
},
'application': ['jQuery']
},
optimize: 'uglify2',
modules: [
{
name: 'main'
}
]
})
Now how do I add check for jquery path here?