You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importMapfrom"@arcgis/core/Map";importMapViewfrom"@arcgis/core/views/MapView";import"@arcgis/core/assets/esri/themes/dark/main.css";import"@esri/calcite-components/dist/calcite/calcite.css";constmap=newMap({basemap: "topo-vector"});constview=newMapView({container: "viewDiv",// reference the div idmap: map,zoom: 4,center: [15,65]});
chenjiahan
changed the title
[Bug]: 不支持 @arcgis/core, 在编译阶段就报错,Uncaught SyntaxError: Unexpected token ';'
[Bug]: @arcgis/core is not supported. Error message is displayed during compilation: Uncaught SyntaxError: Unexpected token ';' #7397
Aug 1, 2024
I conducted a preliminary investigation. The npm package @arcgis/core releases the minified js product, which causes Rspack/webpack to easily make wrong analysis during scope analysis and variable replace.
After I formatted this npm package via npx prettier --write ., it works
Version
Details
yarn dev
浏览器控制台报错:Uncaught SyntaxError: Unexpected token ';'yarn build
报错:Reproduce link
https://developers.arcgis.com/javascript/latest/get-started-npm/#api
Reproduce Steps
index.html
index.js
css
The text was updated successfully, but these errors were encountered: