目录
问题
在使用vue和webpack创建的项目时,ArcGIS API for JavaScript 4.X从较低版本升级为高版本后,构建项目中出现问题:
Module parse failed: Unexpected token. You may need an appropriate loader to handle this file type...
error in ./node_modules/@arcgis/core/views/3d/layers/SceneLayerWorker.js
Module parse failed: Unexpected token (5:673)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| See https://js.arcgis.com/4.24/esri/copyright.txt for details.
| */
原因
新版本的ArcGIS API引用新版本的ES2020