I know that this question has already been there, but am raising it because after trying all blogs issue did not get resolved.

Am trying to load non-AMD module having dependency on AMD module. Since its not possible so as suggested in other blogs to make AMD as non-AMD then it can be used as dependency to non-AMD module.

Below is my config json.

  "globalName": "jQuery"
  "globalName": "jQuery",
  "globalDependencies": ["jquery"]

And, am importing it like this way

import * as $ from 'jquery';
//import 'jqueryUI';

Where am doing wrong?

Blogs that I read are:-

  1. https://blog.mastykarz.nl/sharepoint-framework-client-side-web-parts-jquery-plugins-cdn/
  2. https://github.com/SharePoint/sp-dev-docs/issues/336
  3. https://docs.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/get-started/add-jqueryui-accordion-to-web-part
  • What problem do you have exactly? May 3, 2018 at 17:15
  • Apology for delay in response. I want to load jQuery first then jQuery UI in my application where am referring url for both libraries from cdn. And for that, I tried the configurations as given above. But it doesn't work and throw an error as specified in title of question. So, today I installed the typings of jQuery UI explicitly and mentioned in tsconfig.json and it works! But still I didn't understand its exact working process. Can it possible for you to point me any specific url which has content in depth? Thanks in advance!
    – ateet
    May 4, 2018 at 14:38


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.