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

  • Home
  • SEARCH
  • 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 7007513
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:37:02+00:00 2026-05-27T21:37:02+00:00

I am using google’s CDN and also trying to load my own AMD modules

  • 0

I am using google’s CDN and also trying to load my own AMD modules using their loader. I know I’m doing something wrong but I’m stuck. Any ideas?

    <script src="https://ajax.googleapis.com/ajax/libs/dojo/1.7.0/dojo/dojo.js" 
            type="text/javascript" data-dojo-config="async:true,parseOnLoad:true"></script>
    <script type="text/javascript">
        require(["dojo/_base/kernel", "dojo/_base/loader", "dojo/parser"], function(dojo){
            dojo.registerModulePath("pgGallery", "http://127.0.0.1:8080/js");
        });
        require(["pgGallery/Message"], function(m){
            m.success("foo");
        });
    </script>

http://127.0.0.1:8080/js/Message.js is the location of the module.

  • 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-05-27T21:37:02+00:00Added an answer on May 27, 2026 at 9:37 pm

    I figured out how to do it here: http://dojotoolkit.org/reference-guide/quickstart/cross-domain.html under “Using CDN with Local modules”.

    The example from the page:

    <script type="text/javascript">
        var dojoConfig = {
            async: true,
            packages: [
                {
                    name: "my",
                    location: "/absolute/path/to/local/modules"
                }
            ]
        };
    </script>
    
    <!-- Bootstrap Dojo From Google's CDN -->
    <!-- removing the protocol from src url auto detects if current page is served via http or https and also loads the dojo resources from matching protocol -->
    <script
        type="text/javascript"
        src="//ajax.googleapis.com/ajax/libs/dojo/1.7.1/dojo/dojo.js">
    </script>
    
    <script type="text/javascript">
        require(["my/FooModule"], function(FooModule){
            // ...
        });
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Google App Engine with their webapp framework. Is there something like Django's
When using Google app engine is there any benefit to use a CDN if
I am using Google App Engine with the Datastore interface. Whenever I'm trying to
Using google docs, a colleague has created a plot similar to: I'm trying to
Using Google Maps, I am trying to have an info window open with tabs
I'm using Google Apps for my domain , and trying to enable access to
I'm using Google AppEngine with their built in web server. My development goes about
Before using google collections I had something similar to next code: private Set<A> aSet
I've started using google js test and have become stuck trying to unit test
Using Google App Engine and GQL and Python: in my datastore I have something

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.