Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SharePoint 2013 and Requirejs conflict

A simple javascript application I wrote that uses Requriejs in SharePoint 2010 broke after porting over to Office 365. After a quick glance at global variables I noticed that a naming conflict exists between the global variable 'define' in requirejs and SharePoint's init.js

like image 777
Kurt Avatar asked Mar 20 '23 19:03

Kurt


1 Answers

I have come across the exact same problem. But only since a few days! A week ago the exact same app worked perfect.

Maybe Microsoft changed something in the last update.

Kurt's fix didn't worked out for me. So i also had to override the other requirejs variables:

<script type="text/javascript">
    define = undefined;
    requirejs = undefined;
    require = undefined;
</script>

Now everything is working.

like image 166
Hobbes1312 Avatar answered Apr 10 '23 11:04

Hobbes1312