Loading Highcharts via shim using RequireJS and maintaining jQuery dependency
问题 I'm attempting to load the Highcharts library using a shim in RequireJS. However, when Highcharts loads, it throws an exception because it can't access the jQuery methods it depends on. The require config looks like so: require.config({ baseUrl: "js", shim: { 'libs/highcharts/highcharts.src.js': { deps: ['jquery'], exports: function(jQuery) { this.HighchartsAdapter = jQuery; return this.Highcharts; } } } }); The exception that is thrown is: Uncaught TypeError: undefined is not a function and