<?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: Esri JS-API 4.13, Webpack, imported classes show up undefined in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-js-api-4-13-webpack-imported-classes-show-up/m-p/387616#M35761</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are some modules in the API that do not have a default export. In this case you will need to import them with in one of two ways.&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="keyword token"&gt;import&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; watchUtils &lt;SPAN class="keyword token"&gt;from&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'arcgis-js-api/core/watchUtils'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;// OR&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt; whenTrue&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; whenFalse &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;from&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'arcgis-js-api/core/watchUtils'&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;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 17:47:56 GMT</pubDate>
    <dc:creator>ReneRubalcava</dc:creator>
    <dc:date>2021-12-11T17:47:56Z</dc:date>
    <item>
      <title>Esri JS-API 4.13, Webpack, imported classes show up undefined</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-js-api-4-13-webpack-imported-classes-show-up/m-p/387615#M35760</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We are using the ArcGIS JavaScript API 4.13 in an Angular 8 based project and are about to change from esri-loader to a Webpack approach. I followed the instructions on&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/guide/angular/" title="https://developers.arcgis.com/javascript/latest/guide/angular/"&gt;Angular | ArcGIS API for JavaScript 4.14&lt;/A&gt;&amp;nbsp;installing&amp;nbsp;@arcgis/webpack-plugin 4.13.1. The example worked fine, but&amp;nbsp;when i startet migrating the project, several imported classes show up "undefined". I went back to the simple example to reproduce the error, and it was the same.&lt;/P&gt;&lt;P&gt;We are using roughly 50 classes from different packages, but five classes&amp;nbsp;show up undefined, these are the failing imports:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;import watchUtils from 'arcgis-js-api/core/watchUtils';&lt;/LI&gt;&lt;LI&gt;import geometryEngine from 'arcgis-js-api/geometry/geometryEngine';&lt;/LI&gt;&lt;LI&gt;import webMercatorUtils from 'arcgis-js-api/geometry/support/webMercatorUtils';&lt;/LI&gt;&lt;LI&gt;import size from 'arcgis-js-api/renderers/smartMapping/creators/size';&lt;/LI&gt;&lt;LI&gt;import color from 'arcgis-js-api/renderers/smartMapping/creators/color';&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I realize that each of the imported classes starts with a lower case letter, but the same goes for "import config from 'arcgis-js-api/config';", which is not failing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What am i missing?&lt;BR /&gt;Cheers,&lt;/P&gt;&lt;P&gt;Schotty&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Feb 2020 17:12:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-js-api-4-13-webpack-imported-classes-show-up/m-p/387615#M35760</guid>
      <dc:creator>AndreasKunz</dc:creator>
      <dc:date>2020-02-03T17:12:31Z</dc:date>
    </item>
    <item>
      <title>Re: Esri JS-API 4.13, Webpack, imported classes show up undefined</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-js-api-4-13-webpack-imported-classes-show-up/m-p/387616#M35761</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are some modules in the API that do not have a default export. In this case you will need to import them with in one of two ways.&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="keyword token"&gt;import&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; watchUtils &lt;SPAN class="keyword token"&gt;from&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'arcgis-js-api/core/watchUtils'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;// OR&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt; whenTrue&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; whenFalse &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;from&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'arcgis-js-api/core/watchUtils'&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;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 17:47:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-js-api-4-13-webpack-imported-classes-show-up/m-p/387616#M35761</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2021-12-11T17:47:56Z</dc:date>
    </item>
    <item>
      <title>Re: Esri JS-API 4.13, Webpack, imported classes show up undefined</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-js-api-4-13-webpack-imported-classes-show-up/m-p/387617#M35762</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rene,&lt;/P&gt;&lt;P&gt;thanks, that solved the problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Feb 2020 08:47:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-js-api-4-13-webpack-imported-classes-show-up/m-p/387617#M35762</guid>
      <dc:creator>AndreasKunz</dc:creator>
      <dc:date>2020-02-04T08:47:18Z</dc:date>
    </item>
  </channel>
</rss>

