Rich-text Reply

Optimizely jQuery conflicting with AMD loaded version of jQuery

treed 07-12-16

Optimizely jQuery conflicting with AMD loaded version of jQuery

I am loading jQuery through requireJS and the requireJS shim.

Like so: 

 

 

require.config({
    "paths": {
        "jquery": "libs/jquery-1.8.3",
        "shim": {
             "jquery": {
             "exports": "jQuery"
        }
});

However this version of jQuery is always overwritten by Optimizely's jquery version 1.11.3, and then when called in subsequent files jQuery is undefined.

 

 

See attachment for screenshot of issue.

 

If you are specifying noConflict() at your end, why does this overwrite my version implemented with requireJS?

Is it to do with AMD module naming implemented by jQuery? 

 

This was not an issue until we updated to version 1.11.3 within Optimizely.

 

Any help much appreciated.

 

Capture.PNG
Level 1

robertchan 07-12-16
 

Re: Optimizely jQuery conflicting with AMD loaded version of jQuery

If you're loading jQuery through requireJS then try turning off jQuery within Optimizely in your project settings.
Robert Chan

Experimentation Hero