<?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 How to fix ChunkLoadError when using ES Modules with JavaScript SDK in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-fix-chunkloaderror-when-using-es-modules/m-p/1332538#M82322</link>
    <description>&lt;P&gt;When I try to use ES modules with the JavaScript SDK in a Node.js project, I get lots of the following error.&amp;nbsp; If I use the CommonJS module system everything works fine.&amp;nbsp; My configuration files are show below.&amp;nbsp; How do I fix this problem?&lt;/P&gt;&lt;P&gt;Unable to create map view. &lt;STRONG&gt;ChunkLoadError&lt;/STRONG&gt;: Loading chunk vendors-node_modules_arcgis_core_views_navigation_PanPlanarMomentumEstimator_js-node_modules_-6bde0d failed.&lt;/P&gt;&lt;P&gt;tsconfig.json:&lt;BR /&gt;{&lt;BR /&gt;"compilerOptions": {&lt;BR /&gt;"module": "ES2020",&lt;BR /&gt;"moduleResolution": "Bundler",&lt;BR /&gt;"target": "ES2020",&lt;BR /&gt;"sourceMap": true,&lt;BR /&gt;"esModuleInterop": true,&lt;BR /&gt;"noEmitOnError": true,&lt;BR /&gt;"jsx": "react",&lt;BR /&gt;"skipLibCheck": true&lt;BR /&gt;},&lt;BR /&gt;"exclude": [&lt;BR /&gt;"node_modules",&lt;BR /&gt;]&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;package.json:&lt;BR /&gt;{&lt;BR /&gt;"name": "test_sdk",&lt;BR /&gt;"type": "module",&lt;BR /&gt;"version": "0.0.0",&lt;BR /&gt;"description": "Test",&lt;BR /&gt;"main": "index.js",&lt;BR /&gt;"devDependencies": {&lt;BR /&gt;"@arcgis/core": "^4.27.6",&lt;BR /&gt;"@auth0/auth0-spa-js": "^2.1.0",&lt;BR /&gt;"@emotion/react": "^11.11.1",&lt;BR /&gt;"@emotion/styled": "^11.11.0",&lt;BR /&gt;"@material-ui/types": "^5.1.0",&lt;BR /&gt;"@mui/material": "^5.13.6",&lt;BR /&gt;"@types/node": "^14.18.53",&lt;BR /&gt;"@types/react": "^18.2.14",&lt;BR /&gt;"@types/react-dom": "^18.2.6",&lt;BR /&gt;"express": "^4.18.2",&lt;BR /&gt;"path": "^0.12.7",&lt;BR /&gt;"react": "^18.2.0",&lt;BR /&gt;"react-dom": "^18.2.0",&lt;BR /&gt;"ts-loader": "^9.4.4",&lt;BR /&gt;"typescript": "^5.1.6",&lt;BR /&gt;"webpack": "^5.88.1",&lt;BR /&gt;"webpack-cli": "^5.1.4",&lt;BR /&gt;"webpack-node-externals": "^3.0.0"&lt;BR /&gt;},&lt;BR /&gt;"scripts": {&lt;BR /&gt;"build": "webpack-cli --config webpack.config.js",&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;webpack.config.js:&lt;BR /&gt;export default {&lt;BR /&gt;target: "web",&lt;BR /&gt;entry: "./Default.ts",&lt;BR /&gt;mode: "development",&lt;BR /&gt;devtool: "source-map",&lt;BR /&gt;output: {&lt;BR /&gt;filename: "./app-bundle.js",&lt;BR /&gt;devtoolModuleFilenameTemplate: '[resource-path]'&lt;BR /&gt;},&lt;BR /&gt;resolve: {&lt;BR /&gt;extensions: ['.ts', '.js', '.jsx', '.tsx']&lt;BR /&gt;},&lt;BR /&gt;module: {&lt;BR /&gt;rules: [&lt;BR /&gt;{&lt;BR /&gt;test: /\.tsx$|ts/,&lt;BR /&gt;exclude: /node_modules/,&lt;BR /&gt;use: {&lt;BR /&gt;loader: 'ts-loader'&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;BR /&gt;};&lt;/P&gt;</description>
    <pubDate>Tue, 26 Sep 2023 17:10:48 GMT</pubDate>
    <dc:creator>BradBarnell</dc:creator>
    <dc:date>2023-09-26T17:10:48Z</dc:date>
    <item>
      <title>How to fix ChunkLoadError when using ES Modules with JavaScript SDK</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-fix-chunkloaderror-when-using-es-modules/m-p/1332538#M82322</link>
      <description>&lt;P&gt;When I try to use ES modules with the JavaScript SDK in a Node.js project, I get lots of the following error.&amp;nbsp; If I use the CommonJS module system everything works fine.&amp;nbsp; My configuration files are show below.&amp;nbsp; How do I fix this problem?&lt;/P&gt;&lt;P&gt;Unable to create map view. &lt;STRONG&gt;ChunkLoadError&lt;/STRONG&gt;: Loading chunk vendors-node_modules_arcgis_core_views_navigation_PanPlanarMomentumEstimator_js-node_modules_-6bde0d failed.&lt;/P&gt;&lt;P&gt;tsconfig.json:&lt;BR /&gt;{&lt;BR /&gt;"compilerOptions": {&lt;BR /&gt;"module": "ES2020",&lt;BR /&gt;"moduleResolution": "Bundler",&lt;BR /&gt;"target": "ES2020",&lt;BR /&gt;"sourceMap": true,&lt;BR /&gt;"esModuleInterop": true,&lt;BR /&gt;"noEmitOnError": true,&lt;BR /&gt;"jsx": "react",&lt;BR /&gt;"skipLibCheck": true&lt;BR /&gt;},&lt;BR /&gt;"exclude": [&lt;BR /&gt;"node_modules",&lt;BR /&gt;]&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;package.json:&lt;BR /&gt;{&lt;BR /&gt;"name": "test_sdk",&lt;BR /&gt;"type": "module",&lt;BR /&gt;"version": "0.0.0",&lt;BR /&gt;"description": "Test",&lt;BR /&gt;"main": "index.js",&lt;BR /&gt;"devDependencies": {&lt;BR /&gt;"@arcgis/core": "^4.27.6",&lt;BR /&gt;"@auth0/auth0-spa-js": "^2.1.0",&lt;BR /&gt;"@emotion/react": "^11.11.1",&lt;BR /&gt;"@emotion/styled": "^11.11.0",&lt;BR /&gt;"@material-ui/types": "^5.1.0",&lt;BR /&gt;"@mui/material": "^5.13.6",&lt;BR /&gt;"@types/node": "^14.18.53",&lt;BR /&gt;"@types/react": "^18.2.14",&lt;BR /&gt;"@types/react-dom": "^18.2.6",&lt;BR /&gt;"express": "^4.18.2",&lt;BR /&gt;"path": "^0.12.7",&lt;BR /&gt;"react": "^18.2.0",&lt;BR /&gt;"react-dom": "^18.2.0",&lt;BR /&gt;"ts-loader": "^9.4.4",&lt;BR /&gt;"typescript": "^5.1.6",&lt;BR /&gt;"webpack": "^5.88.1",&lt;BR /&gt;"webpack-cli": "^5.1.4",&lt;BR /&gt;"webpack-node-externals": "^3.0.0"&lt;BR /&gt;},&lt;BR /&gt;"scripts": {&lt;BR /&gt;"build": "webpack-cli --config webpack.config.js",&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;webpack.config.js:&lt;BR /&gt;export default {&lt;BR /&gt;target: "web",&lt;BR /&gt;entry: "./Default.ts",&lt;BR /&gt;mode: "development",&lt;BR /&gt;devtool: "source-map",&lt;BR /&gt;output: {&lt;BR /&gt;filename: "./app-bundle.js",&lt;BR /&gt;devtoolModuleFilenameTemplate: '[resource-path]'&lt;BR /&gt;},&lt;BR /&gt;resolve: {&lt;BR /&gt;extensions: ['.ts', '.js', '.jsx', '.tsx']&lt;BR /&gt;},&lt;BR /&gt;module: {&lt;BR /&gt;rules: [&lt;BR /&gt;{&lt;BR /&gt;test: /\.tsx$|ts/,&lt;BR /&gt;exclude: /node_modules/,&lt;BR /&gt;use: {&lt;BR /&gt;loader: 'ts-loader'&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;BR /&gt;};&lt;/P&gt;</description>
      <pubDate>Tue, 26 Sep 2023 17:10:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-fix-chunkloaderror-when-using-es-modules/m-p/1332538#M82322</guid>
      <dc:creator>BradBarnell</dc:creator>
      <dc:date>2023-09-26T17:10:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to fix ChunkLoadError when using ES Modules with JavaScript SDK</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-fix-chunkloaderror-when-using-es-modules/m-p/1332552#M82324</link>
      <description>&lt;P&gt;Tough to tell from snippets. Try to compare against samples in here, there is a webpack sample too&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/Esri/jsapi-resources/tree/main/esm-samples" target="_blank"&gt;https://github.com/Esri/jsapi-resources/tree/main/esm-samples&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Sep 2023 17:42:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-fix-chunkloaderror-when-using-es-modules/m-p/1332552#M82324</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2023-09-26T17:42:16Z</dc:date>
    </item>
  </channel>
</rss>

