<?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: create-react-app with ESM has errors after build/deploy in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/create-react-app-with-esm-has-errors-after-build/m-p/1015120#M71327</link>
    <description>&lt;P&gt;Thanks &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/7384"&gt;@ReneRubalcava&lt;/a&gt;&amp;nbsp;But these fixes didn't seem to help with -template typescript. Tried both browserlist &amp;amp; rewired.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 08 Jan 2021 17:53:28 GMT</pubDate>
    <dc:creator>KellyChan</dc:creator>
    <dc:date>2021-01-08T17:53:28Z</dc:date>
    <item>
      <title>create-react-app with ESM has errors after build/deploy</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/create-react-app-with-esm-has-errors-after-build/m-p/1014368#M71297</link>
      <description>&lt;P&gt;I'm testing ESM with a create-react-app -template typescript. The project run successfully locally in the dev environment. But when build and deployed, it doesn't draw any features, with errors below. Greatly appreciate any advices.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="KellyChan_0-1609957462696.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/3325iD01150D35C371430/image-size/medium?v=v2&amp;amp;px=400" role="button" title="KellyChan_0-1609957462696.png" alt="KellyChan_0-1609957462696.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I'm testing with the sample from jsapi-resources. Converted to Typescript.&lt;/P&gt;&lt;P&gt;I installed tslib. And also tried tsconfig target from "ES2019" to "ES6".&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jan 2021 18:30:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/create-react-app-with-esm-has-errors-after-build/m-p/1014368#M71297</guid>
      <dc:creator>KellyChan</dc:creator>
      <dc:date>2021-01-06T18:30:20Z</dc:date>
    </item>
    <item>
      <title>Re: create-react-app with ESM has errors after build/deploy</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/create-react-app-with-esm-has-errors-after-build/m-p/1014729#M71317</link>
      <description>&lt;P&gt;Take a look at our ESM samples on github.&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/Esri/jsapi-resources/tree/master/esm-samples/jsapi-create-react-app" target="_blank"&gt;https://github.com/Esri/jsapi-resources/tree/master/esm-samples/jsapi-create-react-app&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have a note about browserlist versions to use.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// package.json
{
  "browserslist": {
    "production": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  },
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately, CRA injects reqs for babel helpers into node_modules code, which I think is weird, but does cause some issues. Since you can't directly modify the webpack config, you can set the browserslist or as noted on that same page, use react-app-rewired to modify the config CRA uses.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jan 2021 17:26:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/create-react-app-with-esm-has-errors-after-build/m-p/1014729#M71317</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2021-01-07T17:26:30Z</dc:date>
    </item>
    <item>
      <title>Re: create-react-app with ESM has errors after build/deploy</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/create-react-app-with-esm-has-errors-after-build/m-p/1015120#M71327</link>
      <description>&lt;P&gt;Thanks &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/7384"&gt;@ReneRubalcava&lt;/a&gt;&amp;nbsp;But these fixes didn't seem to help with -template typescript. Tried both browserlist &amp;amp; rewired.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jan 2021 17:53:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/create-react-app-with-esm-has-errors-after-build/m-p/1015120#M71327</guid>
      <dc:creator>KellyChan</dc:creator>
      <dc:date>2021-01-08T17:53:28Z</dc:date>
    </item>
    <item>
      <title>Re: create-react-app with ESM has errors after build/deploy</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/create-react-app-with-esm-has-errors-after-build/m-p/1017504#M71404</link>
      <description>&lt;P&gt;I have the the same problem exactly,,&amp;nbsp;&lt;BR /&gt;Tried setting the &lt;SPAN&gt;browserlist&amp;nbsp;and it is not working.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;any help?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 17 Jan 2021 10:19:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/create-react-app-with-esm-has-errors-after-build/m-p/1017504#M71404</guid>
      <dc:creator>afal</dc:creator>
      <dc:date>2021-01-17T10:19:17Z</dc:date>
    </item>
    <item>
      <title>Re: create-react-app with ESM has errors after build/deploy</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/create-react-app-with-esm-has-errors-after-build/m-p/1017719#M71420</link>
      <description>&lt;P&gt;This could be a specific issue with the CRA TypeScript template. I'll need to do some testing with it. An alternative is to see of using react-app-rewired will work. You may need to find the source webpack config for the typescript template to see where the babel loader is, it could differ from the default version.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jan 2021 17:45:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/create-react-app-with-esm-has-errors-after-build/m-p/1017719#M71420</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2021-01-18T17:45:36Z</dc:date>
    </item>
  </channel>
</rss>

