<?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>JS Module with Blade : can't use require()</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=113639582" />
  <subtitle>JS Module with Blade : can't use require()</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=113639582</id>
  <updated>2026-04-06T09:01:17Z</updated>
  <dc:date>2026-04-06T09:01:17Z</dc:date>
  <entry>
    <title>RE: JS Module with Blade : can't use require()</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113667473" />
    <author>
      <name>Nils Wilmet</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113667473</id>
    <updated>2019-05-17T14:51:58Z</updated>
    <published>2019-05-17T14:51:58Z</published>
    <summary type="html">Hi Ivan,&lt;br /&gt;&lt;br /&gt;Alright thanks for the information.&lt;br /&gt;​​​​​​​&lt;br /&gt;I don&amp;#39;t see myself as a very good developer to contribute on that feature but I&amp;#39;ll wait for this to be available &lt;img alt="emoticon" src="@theme_images_path@/emoticons/happy.gif" &gt;</summary>
    <dc:creator>Nils Wilmet</dc:creator>
    <dc:date>2019-05-17T14:51:58Z</dc:date>
  </entry>
  <entry>
    <title>RE: JS Module with Blade : can't use require()</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113648153" />
    <author>
      <name>Iván Zaera Avellón</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113648153</id>
    <updated>2019-05-16T06:51:03Z</updated>
    <published>2019-05-16T06:51:03Z</published>
    <summary type="html">Hi Nils:&lt;br /&gt;&lt;br /&gt;Unfortunately we don&amp;#39;t support import for static resources yet. You can track the progress of its implementation here: https://github.com/liferay/liferay-npm-build-tools/issues/303&lt;br /&gt;&lt;br /&gt;Alternatively, if you want to contribute that support to make arrive faster, I can guide you on how it could be done :-).&lt;br /&gt;&lt;br /&gt;Cheers,&lt;br /&gt;Ivan</summary>
    <dc:creator>Iván Zaera Avellón</dc:creator>
    <dc:date>2019-05-16T06:51:03Z</dc:date>
  </entry>
  <entry>
    <title>JS Module with Blade : can't use require()</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113639581" />
    <author>
      <name>Nils Wilmet</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113639581</id>
    <updated>2019-05-15T10:15:20Z</updated>
    <published>2019-05-15T10:15:20Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;Hi,&lt;br&gt;&lt;br&gt;I'v created a portlet with Eclipse Liferay IDE, npm-react-portlet. Everything works fine except for to main issues :&lt;ul style="list-style: disc outside;"&gt;&lt;li&gt;I can't user the method "require()" for style or image&lt;/li&gt;&lt;li&gt;I can't use "import" on css or images&lt;/li&gt;&lt;/ul&gt;I think it's because of that that a lot of npm plugins I want to use ends up not working or working partially.&lt;br&gt;&lt;br&gt;Both of above methods (require and imports css/images) are not working and results in the same error : no portlet and this error in dev console &lt;br&gt;&lt;pre&gt;&lt;code&gt;Load timeout for modules: metal-dom/src/all/dom,metal-uri/src/Uri,clay-tooltip/src/ClayTooltip,agiir-petitesannonces@1.0.0&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;I've already installed and using the preset es2016 for Babel. Is this an issue with Babel ? Do I need to install something else ? &lt;br&gt;&lt;br&gt;Thanks a lot&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Nils Wilmet</dc:creator>
    <dc:date>2019-05-15T10:15:20Z</dc:date>
  </entry>
</feed>
