the_bluescreen
the_bluescreen

Reputation: 3414

Check jquery in paths / require.config - Require.js

I'n trying to check jquery load in my project that is loaded or not. But i want to do this in my require.config. I set shim setting like;

require.config({
  'paths': {
      'jquery': !window.jQuery ? '../Libraries/jquery-1.10.1.min' : window.jQuery,
      'jqueryui': '../Libraries/jquery-ui-1.10.0.custom',
      'underscore': '../Libraries/underscore-1.4.4',
      'mousetrap': '../Libraries/mousetrap-1.4.0'
  },

  shim: {
      'underscore': {
          exports: 'under'
      },
      'jqueryui': ['jquery'],
      'mousetrap': ["jquery"]
  }
});

But it's giving error. Require.js is trying get link from function. Can i check jquery in config? Or Should i use another way?

Btw. Error; Uncaught Error: Script error http://requirejs.org/docs/errors.html#scripterror require-2.1.5.js:159

Thanks

Upvotes: 1

Views: 609

Answers (1)

Related Questions