Conflicts of SharePoint 2013 and Requirejs

The simple javascript application I wrote uses Requriejs in SharePoint 2010 after moving to Office 365. After a quick look at the global variables, I noticed that there is a name conflict between the "define" global variable in requirejs and SharePoint init. Js

+4
source share
2 answers

I ran into the same problem. But only in a few days! A week ago, the same application worked fine.

Perhaps Microsoft has changed something in the latest update.

Kurt's fix didn't work for me. Therefore, I also had to override the other requirejs variables:

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

.

+4

, , "define" , require.js :

<script type="text/javascript">      
    define = undefined;
</script>
<script type="text/javascript" src="../Scripts/require.js" data-main="../App/main" />

- . , . - ? - - ?

+3

Source: https://habr.com/ru/post/1523758/


All Articles