<?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 build @arcgis/core webpack component to npm in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/build-arcgis-core-webpack-component-to-npm/m-p/1169637#M77194</link>
    <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/7384"&gt;@ReneRubalcava&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm creating a map component (using&amp;nbsp;@arcgis/core)&amp;nbsp;with some default layers and features and publishing it to npm to be utilized within our applications. I'm successful with rollup bundling, however the size of the unpackaged bundle is above 50 MB.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've followed&amp;nbsp;&lt;A href="https://odoe.net/blog/arcgis-jsapi-build-tips" target="_blank" rel="noopener"&gt;https://odoe.net/blog/arcgis-jsapi-build-tips&lt;/A&gt;&amp;nbsp;to build my component using webpack. When using the built component used in any react application, I'm getting a series of errors unending errors.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible you could provide me with an example of how to accomplish my task?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 02 May 2022 03:28:08 GMT</pubDate>
    <dc:creator>naveenanne</dc:creator>
    <dc:date>2022-05-02T03:28:08Z</dc:date>
    <item>
      <title>build @arcgis/core webpack component to npm</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/build-arcgis-core-webpack-component-to-npm/m-p/1169637#M77194</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/7384"&gt;@ReneRubalcava&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm creating a map component (using&amp;nbsp;@arcgis/core)&amp;nbsp;with some default layers and features and publishing it to npm to be utilized within our applications. I'm successful with rollup bundling, however the size of the unpackaged bundle is above 50 MB.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've followed&amp;nbsp;&lt;A href="https://odoe.net/blog/arcgis-jsapi-build-tips" target="_blank" rel="noopener"&gt;https://odoe.net/blog/arcgis-jsapi-build-tips&lt;/A&gt;&amp;nbsp;to build my component using webpack. When using the built component used in any react application, I'm getting a series of errors unending errors.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible you could provide me with an example of how to accomplish my task?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 May 2022 03:28:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/build-arcgis-core-webpack-component-to-npm/m-p/1169637#M77194</guid>
      <dc:creator>naveenanne</dc:creator>
      <dc:date>2022-05-02T03:28:08Z</dc:date>
    </item>
    <item>
      <title>Re: build @arcgis/core webpack component to npm</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/build-arcgis-core-webpack-component-to-npm/m-p/1169744#M77202</link>
      <description>&lt;P&gt;When you use your built component in your application (the npm package) are you also using the ArcGIS JSAPI in your app? If so, you can't mix JSAPI instances in your app with your component. You'll see errors regarding the Accessor. This is equivalent to trying to create a MapView using&amp;nbsp;@arcgis/core and loading a Map created with the CDN. It won't work. You can publish your component without including the JSAPI in your build, and let the build tools handle it in your app. I do something similar with this published utility library (&lt;A href="https://github.com/odoe/explode" target="_blank" rel="noopener"&gt;https://github.com/odoe/explode&lt;/A&gt;).&lt;/P&gt;</description>
      <pubDate>Mon, 02 May 2022 16:00:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/build-arcgis-core-webpack-component-to-npm/m-p/1169744#M77202</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2022-05-02T16:00:21Z</dc:date>
    </item>
    <item>
      <title>Re: build @arcgis/core webpack component to npm</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/build-arcgis-core-webpack-component-to-npm/m-p/1169907#M77203</link>
      <description>&lt;P&gt;The example helped and it worked like a charm, thanks a lot&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/7384"&gt;@ReneRubalcava&lt;/a&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 02 May 2022 21:01:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/build-arcgis-core-webpack-component-to-npm/m-p/1169907#M77203</guid>
      <dc:creator>naveenanne</dc:creator>
      <dc:date>2022-05-02T21:01:03Z</dc:date>
    </item>
  </channel>
</rss>

