<?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: Question about import syntax for Map web components in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/question-about-import-syntax-for-map-web/m-p/1674407#M87991</link>
    <description>&lt;P&gt;Are you guys using older versions of Node by chance?&amp;nbsp; I've got this TS&amp;nbsp;&lt;A href="https://github.com/sagewall/vite-map-components/blob/main/src/main.ts" target="_self"&gt;Github Repo&lt;/A&gt; that works with without the `dist` folder in the path.&amp;nbsp; Just trying to narrow down what's happening.&amp;nbsp; I know the assets can have issues with older development environments and wonder if something similar is happening here with the map component imports.&amp;nbsp; I'm using node 24.11.0&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/working-with-assets/#explicitly-import-local-stylesheets-if-necessary" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/javascript/latest/working-with-assets/#explicitly-import-local-stylesheets-if-necessary&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 19 Dec 2025 21:53:53 GMT</pubDate>
    <dc:creator>Sage_Wall</dc:creator>
    <dc:date>2025-12-19T21:53:53Z</dc:date>
    <item>
      <title>Question about import syntax for Map web components</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/question-about-import-syntax-for-map-web/m-p/1671452#M87946</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;On the official documentation it says to import web components like this:&lt;/P&gt;&lt;P&gt;import&amp;nbsp;&lt;SPAN&gt;'@arcgis/map-components/components/arcgis-scale-bar'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;but in practice i have to import it with the dist folder or else it won't find it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;on disk, i do see the folder path under node_modules is&amp;nbsp;&lt;SPAN&gt;arcgis/map-components/dist/components/arcgis-scale-bar but it feels like there is some missing mapping maybe.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;import '@arcgis/map-components/dist/components/arcgis-scale-bar'.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;i did an npm install and saved it to my package.json.&amp;nbsp; I'm not sure why i have to specify the dist folder&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Jonathan&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 09 Dec 2025 01:02:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/question-about-import-syntax-for-map-web/m-p/1671452#M87946</guid>
      <dc:creator>JonathanTiu</dc:creator>
      <dc:date>2025-12-09T01:02:47Z</dc:date>
    </item>
    <item>
      <title>Re: Question about import syntax for Map web components</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/question-about-import-syntax-for-map-web/m-p/1671622#M87952</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/697272"&gt;@JonathanTiu&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Are you using the latest version (4.34) of the SDK or an older version?&amp;nbsp; The import path above looks correct for the latest version, however in some previous versions the `dist` was needed in the imports.&amp;nbsp; We hope to address situations like this in the future by providing documentation for older versions of the SDK online.&amp;nbsp; Currently our documentation assumes you are using the latest version.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Dec 2025 15:22:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/question-about-import-syntax-for-map-web/m-p/1671622#M87952</guid>
      <dc:creator>Sage_Wall</dc:creator>
      <dc:date>2025-12-09T15:22:44Z</dc:date>
    </item>
    <item>
      <title>Re: Question about import syntax for Map web components</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/question-about-import-syntax-for-map-web/m-p/1672558#M87967</link>
      <description>&lt;P&gt;yes I am using 4.34 for both core and map-components?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JonathanTiu_0-1765501988965.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/145341i505AF66845370AA0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JonathanTiu_0-1765501988965.png" alt="JonathanTiu_0-1765501988965.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Dec 2025 01:13:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/question-about-import-syntax-for-map-web/m-p/1672558#M87967</guid>
      <dc:creator>JonathanTiu</dc:creator>
      <dc:date>2025-12-12T01:13:23Z</dc:date>
    </item>
    <item>
      <title>Re: Question about import syntax for Map web components</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/question-about-import-syntax-for-map-web/m-p/1672659#M87968</link>
      <description>&lt;P&gt;Weird, The only thing I can think of is that your node_modules folder or some sort of cache is corrupt.&amp;nbsp; Have you tried deleting node_modules and then running `npm install`?&amp;nbsp; Are you using Vite by chance, it makes it's own cache.&amp;nbsp; You can force Vite to clear the cache with `npm run dev -- --force`&lt;/P&gt;</description>
      <pubDate>Fri, 12 Dec 2025 15:46:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/question-about-import-syntax-for-map-web/m-p/1672659#M87968</guid>
      <dc:creator>Sage_Wall</dc:creator>
      <dc:date>2025-12-12T15:46:04Z</dc:date>
    </item>
    <item>
      <title>Re: Question about import syntax for Map web components</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/question-about-import-syntax-for-map-web/m-p/1674172#M87984</link>
      <description>&lt;P&gt;I have the same issue, but only when using TypeScript. Find a basic repro attached. Unzip it, run `npm install`, and open the folder in VS Code. A JS file in the same project does not have the issue.&lt;/P&gt;&lt;P&gt;Per this screenshot, note that autocomplete only offers "dist" after "map-components".&lt;/P&gt;&lt;P&gt;If you&amp;nbsp;&lt;EM&gt;don't&lt;/EM&gt; include "dist" in the path, you'll get an error squiggle under the "barStyle" property of the arcgis-scale-bar element.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="arcgis ts dist.png" style="width: 774px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/145892i13A8F907309F2D40/image-size/large?v=v2&amp;amp;px=999" role="button" title="arcgis ts dist.png" alt="arcgis ts dist.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;In this example, I'm finding that it compiles fine whether you include "dist" or not.&lt;/P&gt;&lt;P&gt;I have another, much larger project, where excluding "dist" from the path is causing webpack compile errors. I haven't been able to isolate why that one behaves differently.&lt;/P&gt;&lt;P&gt;There's no Vite involved here. And as far as I can tell, no cache-related issues. At least not&amp;nbsp;&lt;EM&gt;local&lt;/EM&gt; cache. It's an entirely clean / new project.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Dec 2025 05:01:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/question-about-import-syntax-for-map-web/m-p/1674172#M87984</guid>
      <dc:creator>JasonDoingMaps</dc:creator>
      <dc:date>2025-12-19T05:01:12Z</dc:date>
    </item>
    <item>
      <title>Re: Question about import syntax for Map web components</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/question-about-import-syntax-for-map-web/m-p/1674325#M87986</link>
      <description>&lt;P&gt;this is true. i am also using Typescript.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Dec 2025 18:14:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/question-about-import-syntax-for-map-web/m-p/1674325#M87986</guid>
      <dc:creator>JonathanTiu</dc:creator>
      <dc:date>2025-12-19T18:14:21Z</dc:date>
    </item>
    <item>
      <title>Re: Question about import syntax for Map web components</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/question-about-import-syntax-for-map-web/m-p/1674407#M87991</link>
      <description>&lt;P&gt;Are you guys using older versions of Node by chance?&amp;nbsp; I've got this TS&amp;nbsp;&lt;A href="https://github.com/sagewall/vite-map-components/blob/main/src/main.ts" target="_self"&gt;Github Repo&lt;/A&gt; that works with without the `dist` folder in the path.&amp;nbsp; Just trying to narrow down what's happening.&amp;nbsp; I know the assets can have issues with older development environments and wonder if something similar is happening here with the map component imports.&amp;nbsp; I'm using node 24.11.0&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/working-with-assets/#explicitly-import-local-stylesheets-if-necessary" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/javascript/latest/working-with-assets/#explicitly-import-local-stylesheets-if-necessary&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Dec 2025 21:53:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/question-about-import-syntax-for-map-web/m-p/1674407#M87991</guid>
      <dc:creator>Sage_Wall</dc:creator>
      <dc:date>2025-12-19T21:53:53Z</dc:date>
    </item>
    <item>
      <title>Re: Question about import syntax for Map web components</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/question-about-import-syntax-for-map-web/m-p/1674419#M87992</link>
      <description>&lt;P&gt;It seems like the exports property in the `@arcgis/map-components/package.json` file isn't working correctly for you.&amp;nbsp; It's supposed for forward the `./components/` path to the `/dist/components/` path but apparently that isn't working right in your development environments.&amp;nbsp; It would be nice to get this documented in some way to help with this situation.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// package.json exports
  "exports": {
    ".": "./dist/index.js",
    "./loader": "./dist/loader.js",
    "./package.json": "./package.json",
    "./components/*/customElement": "./dist/components/*/customElement.js",
    "./components/*": "./dist/components/*/index.js",
    "./types/*": "./dist/types/*.d.ts",
    "./docs/*": "./dist/docs/*",
    "./arcgis-map-components/arcgis-map-components.css": "./dist/cdn/main.css",
    "./dist/arcgis-map-components/arcgis-map-components.css": "./dist/cdn/main.css",
    "./dist/loader": "./dist/loader.js",
    "./dist/components": "./dist/index.js",
    "./dist/components/*": "./dist/components/*/index.js",
    "./main.css": "./dist/cdn/main.css"
  },&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Dec 2025 22:30:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/question-about-import-syntax-for-map-web/m-p/1674419#M87992</guid>
      <dc:creator>Sage_Wall</dc:creator>
      <dc:date>2025-12-19T22:30:54Z</dc:date>
    </item>
    <item>
      <title>Re: Question about import syntax for Map web components</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/question-about-import-syntax-for-map-web/m-p/1674432#M87994</link>
      <description>&lt;P&gt;No, not using an old version of node, I'm running v24.12.0.&lt;/P&gt;</description>
      <pubDate>Sat, 20 Dec 2025 00:26:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/question-about-import-syntax-for-map-web/m-p/1674432#M87994</guid>
      <dc:creator>JasonDoingMaps</dc:creator>
      <dc:date>2025-12-20T00:26:01Z</dc:date>
    </item>
    <item>
      <title>Re: Question about import syntax for Map web components</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/question-about-import-syntax-for-map-web/m-p/1674433#M87995</link>
      <description>&lt;P&gt;The moduleResolution setting in tsconfig makes a difference. I see in the repo Sage_Wall linked, it specifies "bundler" for this property, whereas I'm using "node". (Per the guide on Webpack's site -&amp;nbsp;&lt;A href="https://webpack.js.org/guides/typescript/" target="_blank"&gt;https://webpack.js.org/guides/typescript/&lt;/A&gt;).&lt;/P&gt;&lt;P&gt;Reading into it, module resolution "node" is an older version, which seems to not support package.json "exports". Recommendations online point to "node16" or "nodenext" - for my example, these got part-way there, the import was fine, but VS Code was still putting a squiggly line under the reference to HTMLArcgisScaleBarElement property "barStyle". (Though it doesn't produce a build error). Moduleresolution "bundler" seems to satisfy all cases: it doesn't require "dist" in the import, VS Code is happy with the reference to custom element property, and build doesn't produce any errors.&lt;/P&gt;&lt;P&gt;In my legacy project, I'm a&amp;nbsp;&lt;EM&gt;little&lt;/EM&gt; hesitant to switch moduleResolution just for the sake of getting rid of "dist" in the import statements. I haven't experienced any other issues using the "node" resolution strategy. I wonder if the guide on the Webpack site might be a bit out of date though.&lt;/P&gt;</description>
      <pubDate>Sat, 20 Dec 2025 01:17:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/question-about-import-syntax-for-map-web/m-p/1674433#M87995</guid>
      <dc:creator>JasonDoingMaps</dc:creator>
      <dc:date>2025-12-20T01:17:09Z</dc:date>
    </item>
    <item>
      <title>Re: Question about import syntax for Map web components</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/question-about-import-syntax-for-map-web/m-p/1674440#M87996</link>
      <description>&lt;P&gt;Thanks for the additional information&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/536567"&gt;@JasonDoingMaps&lt;/a&gt;&amp;nbsp;.&amp;nbsp; I'll add some information about the moduleResoultion setting to our documentation to hopefully avoid this confusion for other users in the future.&lt;/P&gt;</description>
      <pubDate>Sat, 20 Dec 2025 18:40:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/question-about-import-syntax-for-map-web/m-p/1674440#M87996</guid>
      <dc:creator>Sage_Wall</dc:creator>
      <dc:date>2025-12-20T18:40:14Z</dc:date>
    </item>
  </channel>
</rss>

