<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Fixing Dojo's and JQuery dependant libraries multipleDefine conflict via Javascript in Web AppBuilder Custom Widgets Questions</title>
    <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/fixing-dojo-s-and-jquery-dependant-libraries/m-p/1091885#M14605</link>
    <description>&lt;P&gt;3 years and no answer to this???&lt;/P&gt;</description>
    <pubDate>Tue, 24 Aug 2021 19:00:28 GMT</pubDate>
    <dc:creator>diaconori</dc:creator>
    <dc:date>2021-08-24T19:00:28Z</dc:date>
    <item>
      <title>Fixing Dojo's and JQuery dependant libraries multipleDefine conflict via Javascript</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/fixing-dojo-s-and-jquery-dependant-libraries/m-p/772371#M1754</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This question has been answered many times before, and I know one solution is to simply change it so (Esri's)dojo is the last one to load.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Problem is I'm working on a modular widget that has no access to the page's html to change the order, I must only load libraries via Dojo's AMD Loader.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Folder structure :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/Widget&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;--/Widget.js&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;--/Datatable.js&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the Widget.js file:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="token function"&gt;define&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp; &lt;SPAN class="string token"&gt;'./Datatable'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp; &lt;SPAN class="string token"&gt;&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fcode.jquery.com%2Fjquery-3.3.1.min.js" target="_blank"&gt;https://code.jquery.com/jquery-3.3.1.min.js&lt;/A&gt;&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp; &lt;SPAN class="string token"&gt;&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fstackpath.bootstrapcdn.com%2Fbootstrap%2F4.1.1%2Fjs%2Fbootstrap.bundle.js" target="_blank"&gt;https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.bundle.js&lt;/A&gt;&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;Datatable&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And Datatable.js (just another module I created for organization) :&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="token function"&gt;define&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp; &lt;SPAN class="string token"&gt;&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fcdn.datatables.net%2Fv%2Fbs4%2Fdt-1.10.18%2Fr-2.2.2%2Fdatatables.min.js" target="_blank"&gt;https://cdn.datatables.net/v/bs4/dt-1.10.18/r-2.2.2/datatables.min.js&lt;/A&gt;&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two major issues here;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1)&lt;/STRONG&gt; The AMD Loader is asynchronous and doesn't resolve non-AMD modules dependencies, meaning that order should be important for these libraries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;datatables.min.js requires bootstrap.bundle.js that requires jquery-3.3.1.min.js&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, If I'm lucky the request will load in order depending on latency, not reliable at all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2)&lt;/STRONG&gt; Both Bootstrap and Datatable generic javascript files raise a "multipleDefine" error, probably due to them trying to define "jquery", I'm really not sure how to fix this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I resolve these 2 problems?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 08:38:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/fixing-dojo-s-and-jquery-dependant-libraries/m-p/772371#M1754</guid>
      <dc:creator>SamuelAbati</dc:creator>
      <dc:date>2021-12-12T08:38:29Z</dc:date>
    </item>
    <item>
      <title>Re: Fixing Dojo's and JQuery dependant libraries multipleDefine conflict via Javascript</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/fixing-dojo-s-and-jquery-dependant-libraries/m-p/772372#M1755</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any help with this? &lt;A href="https://community.esri.com/migrated-users/3101"&gt;Robert Scheitlin, GISP&lt;/A&gt;‌ &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jul 2018 17:33:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/fixing-dojo-s-and-jquery-dependant-libraries/m-p/772372#M1755</guid>
      <dc:creator>SamuelAbati</dc:creator>
      <dc:date>2018-07-13T17:33:14Z</dc:date>
    </item>
    <item>
      <title>Re: Fixing Dojo's and JQuery dependant libraries multipleDefine conflict via Javascript</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/fixing-dojo-s-and-jquery-dependant-libraries/m-p/772373#M1756</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Samuel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Sorry I do not know the answer. I do not use other third party libraries like jQuery with WAB. I find no need for them.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jul 2018 18:51:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/fixing-dojo-s-and-jquery-dependant-libraries/m-p/772373#M1756</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2018-07-13T18:51:04Z</dc:date>
    </item>
    <item>
      <title>Re: Fixing Dojo's and JQuery dependant libraries multipleDefine conflict via Javascript</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/fixing-dojo-s-and-jquery-dependant-libraries/m-p/1091885#M14605</link>
      <description>&lt;P&gt;3 years and no answer to this???&lt;/P&gt;</description>
      <pubDate>Tue, 24 Aug 2021 19:00:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/fixing-dojo-s-and-jquery-dependant-libraries/m-p/1091885#M14605</guid>
      <dc:creator>diaconori</dc:creator>
      <dc:date>2021-08-24T19:00:28Z</dc:date>
    </item>
  </channel>
</rss>

