RequireJS, not loading jQuery proberly -


i know there many requirejs topics modules don't load none of them have helped me :-s

my "start.js" file looks like

requirejs.config({ paths: {     jquery: 'js/jquery-2.2.0.min' } });  define(['lib/class', 'lib/underscore.min', 'lib/stacktrace'], function() {     require(["main"]); }); 

my html file contains in head

<script data-main="js/main" src="js/require.js"></script> 

this script load in whole html page

my main function contains

define(['jquery'], function($) {     alert("hello"); }); 

but when load page

error: script error "jquery", needed by: main http://requirejs.org/docs/errors.html#scripterror 

i've tried using base-urls, other locations... "alias" being ignored. while if do

define(['jquery-2.2.0.min'], function($) {     alert("hello"); }); 

it works fine.

anyone has idea? network log says never tries fetch jquery-2.2.0.min wrong "jquery" file.

change data-main load start.js file:

<script data-main="js/start" src="js/require.js"></script> 

as have in question, nothing loads start.js , requirejs configuration not loaded.


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -