Search code examples
javascriptrequirejsglimpse

jquery requirejs and glimpse


I have a MVC website that is using requirejs and jquery 2.0.x.

I decided to try out glimpse and it uses jquery 1.8.x

It appears requirejs wont load the 2.0.x jquery version because the 1.8.x version is loaded into the global/defined by glimpse loading it, even though glimpse has a .noConflict(true); at the end and by the time other modules load the jquery global's are emtpy and things fail.

I tried a module that runs a requirejs.undef('jquery'); and then requirejs will start to load jquery 2.0.x but its to late and other modules (3rd party) that are dependent on jquery fail.

The idea of loading and unloading jquery is not appealing.


Solution

  • I'm sorry to say that this is my fault. In bringing jQuery into Glimpse I didn't take this into account. If you raise the issue on our issue tracker we can work on getting this resolved. We will make sure this gets fixed for you in the next release.