Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9257265
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T12:08:31+00:00 2026-06-18T12:08:31+00:00

Here is how I would do it using plain HTML script tags per this

  • 0

Here is how I would do it using plain HTML script tags per this SO Question on CDN suggestions. This would be a serial load (underscore->jquery->backbone) that holds up the rest of the page.

 <script src="//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.4.4/underscore-min.js"></script>
 <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
 <script src="//cdnjs.cloudflare.com/ajax/libs/backbone.js/0.9.10/backbone-min.js"></script>

How would I load these libraries using require.js or a similar non-blocking method?

References ( links to the API )

  • underscore

  • jQuery

  • backbone

  • require

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T12:08:32+00:00Added an answer on June 18, 2026 at 12:08 pm

    jquery is AMD Friendly so you can just require it in your require.js config

    Backbone and underscore are no longer AMD Friendly so you have these options:

    1. You can either include them as “externals”, with shim assigning the correct dependencies (see here the docs and a tutorial )

    2. Or you can use slightly altered versions of both libraries that are AMD enabled. You can find them in this repository.

    3. Use an older version of backbone and underscore. (not recommended)


    Note: If you opt for the shimming route, keep in mind that those libraries will not be load asynchronously.


    Here’s a working example using the ALTERED VERSIONS of the library:

    require.config({
        enforceDefine: true, //Only libraries AMD Friendly will be loaded
        urlArgs: "bust=" + (new Date()).getTime(), //for development, forces browser to clear the cache
        paths: { // relative paths (to the current file main.js)
            "es5":               'libs/es5-shim/es5-shim',
            "jquery":            'libs/jquery/jquery',
            "jqueryThreeDots":   'libs/jquery/plugins/jquery.ThreeDots',//A jquery plugin
            "underscore":        'libs/underscore/underscore.amd',
            "underscore.string": 'libs/underscore/underscore.string',
            "backbone":          'libs/backbone/backbone.amd',
            "text":              'text',
            "mediator":          'libs/backbone/plugins/backbone.mediator',
            "bootstrap":         'libs/bootstrap/bootstrap.min',
            "rangy":             'libs/rangy/rangy-core.amd',
        },
        shim: {
            "bootstrap": {
                deps: ["jquery"],
                exports: "$.fn.popover"
            }
        }
    });
    

    An example with shim:

    require.config({
        enforceDefine: true,
        urlArgs: "bust=" + (new Date()).getTime(),
        paths: {
            "jquery": 'http://code.jquery.com/jquery-1.9.1.min.js'
        },
        shim: {
            backbone: {
                deps: ["underscore", "jquery"], // Backbone dependencies
                exports: "Backbone" // variable exported
            },
            underscore: {
                exports: "_"
            }
        }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using jquery uploader from here and I would like to know how
I would like to play/pause video using jquery. Here is my code: (function ($)
Any help here would be greatly appreciated. I have this table hospital Nurse |
$('#selector').click(function() { // here I would like to load a javascript file // let's
I am using the following code to send out a Multipart/Alternative HTML and Plain
I would like to make it so that all of my tags look plain
I would like to parse an HTML document using lxml. I am using python
I've been using the tag-it plugin from https://github.com/aehlke/tag-it (demo - http://aehlke.github.com/tag-it/examples.html ). In this
I'm curious how the Python Ninjas around here would do the following, elegantly and
I am relatively new to db design, so any help here would be appreciated.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.