<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>AMD Loader Module Scoping</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=82915871" />
  <subtitle>AMD Loader Module Scoping</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=82915871</id>
  <updated>2026-04-04T12:21:29Z</updated>
  <dc:date>2026-04-04T12:21:29Z</dc:date>
  <entry>
    <title>RE: AMD Loader Module Scoping</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114661809" />
    <author>
      <name>Iván Zaera Avellón</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114661809</id>
    <updated>2019-08-08T08:16:39Z</updated>
    <published>2019-08-08T08:16:39Z</published>
    <summary type="html">Loader.addModule does not longer exist and there&amp;#39;s no replacement for it. That is because all JS module resolution is now done in the server side so it would be quite inefficient (and probably impossible in some scenarios) to support Loader.addModule.&lt;br /&gt;&lt;br /&gt;The alternatives depend on what you are trying to achieve. The most direct one is to simply deploy the module you were adding with Loader.addModule to the server (in a shared bundle JAR) and then consume it from others with the imports feature.&lt;br /&gt;&lt;br /&gt;For example, this project implements shared bundles that deploy react, redux, etc. and two portlets that consume them -&amp;gt; https://github.com/izaera/liferay-js-toolkit-showcase/tree/react</summary>
    <dc:creator>Iván Zaera Avellón</dc:creator>
    <dc:date>2019-08-08T08:16:39Z</dc:date>
  </entry>
  <entry>
    <title>RE: AMD Loader Module Scoping</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114647143" />
    <author>
      <name>Alcivar Chicaiza</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114647143</id>
    <updated>2019-08-07T21:22:37Z</updated>
    <published>2019-08-07T21:22:37Z</published>
    <summary type="html">Hola para la versión 7.2 de liferay ya no se puede hacer el &lt;strong&gt;Loader.addModule &lt;/strong&gt;para esta versión como se debe utilizar o que función es el reemplazo, gracias.</summary>
    <dc:creator>Alcivar Chicaiza</dc:creator>
    <dc:date>2019-08-07T21:22:37Z</dc:date>
  </entry>
  <entry>
    <title>RE: AMD Loader Module Scoping</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=82942706" />
    <author>
      <name>Michael Freeman</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=82942706</id>
    <updated>2016-11-29T13:16:22Z</updated>
    <published>2016-11-29T13:16:22Z</published>
    <summary type="html">No issues--but I was just working on some stuff and my approach was going to have change a bit if they weren&amp;#39;t globally scoped. So thats good news in the end to me &lt;img alt="emoticon" src="@theme_images_path@/emoticons/happy.gif" &gt;&lt;br /&gt;&lt;br /&gt;Thanks</summary>
    <dc:creator>Michael Freeman</dc:creator>
    <dc:date>2016-11-29T13:16:22Z</dc:date>
  </entry>
  <entry>
    <title>RE: AMD Loader Module Scoping</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=82933736" />
    <author>
      <name>Chema Balsas</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=82933736</id>
    <updated>2016-11-29T10:43:52Z</updated>
    <published>2016-11-29T10:43:52Z</published>
    <summary type="html">Hey Michael!&lt;br /&gt;&lt;br /&gt;Yes, the &lt;span style="font-family: Courier New"&gt;Loader.addModule&lt;/span&gt; should create a globally available module. After that, everyone should be able to require the &lt;span style="font-family: Courier New"&gt;jquery&lt;/span&gt; module.&lt;br /&gt;&lt;br /&gt;Are you seeing any issue with it?</summary>
    <dc:creator>Chema Balsas</dc:creator>
    <dc:date>2016-11-29T10:43:52Z</dc:date>
  </entry>
  <entry>
    <title>AMD Loader Module Scoping</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=82915870" />
    <author>
      <name>Michael Freeman</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=82915870</id>
    <updated>2016-11-28T23:28:50Z</updated>
    <published>2016-11-28T23:28:50Z</published>
    <summary type="html">What is the scope of a module loaded through the &amp;#34;Liferay-JS-Config&amp;#34; flag in bnd.bnd and code like this....&lt;br /&gt;&lt;br /&gt;Loader.addModule({&lt;br /&gt;    dependencies: [],&lt;br /&gt;    name: &amp;#39;jquery&amp;#39;,&lt;br /&gt;    path: MODULE_PATH + &amp;#39;/js/jquery-2.2.3.js&amp;#39;&lt;br /&gt;});&lt;br /&gt;&lt;br /&gt;.....does that now create a &amp;#39;jquery&amp;#39; module that all other bundles (Liferay modules) can reference/require? (i.e. globally scoped) &lt;br /&gt;&lt;br /&gt;or is that &amp;#39;jquery&amp;#39; module only available to other &amp;#34;require&amp;#34; operations within the same bundle (ie the one that contained the code above)?</summary>
    <dc:creator>Michael Freeman</dc:creator>
    <dc:date>2016-11-28T23:28:50Z</dc:date>
  </entry>
</feed>
