Skip to content Skip to sidebar Skip to footer

Backbone.js And Require.js: Mismatched Anonymous Define() Module: Function (_, Backbone) {

I am new to using require.js and have the following app.js file as part of my backbone app: require.config({ baseUrl: '/js/', paths: { jquery: 'libs/jquery-2.1.0', undersco

Solution 1:

I'm using the config above,

as you can see is there minimals diffs

As you can see comparing my sample image with you way to declare, is there minimals diffs:

  • You don't need to declare shim libs at paths, just use the same name;
  • My baseUrl starts on my js\lib folder;
  • I'm using file name on my json config;

When I declare the "setup" on my main html page I'm using like that:

<scriptdata-main="js/setup.js"src="js/lib/require.js"></script>

Post a Comment for "Backbone.js And Require.js: Mismatched Anonymous Define() Module: Function (_, Backbone) {"