ArcGIS webpack plugin for rendering map, Module not found: Error: Can't resolve 'esri/Map'
ArcGIS webpack plugin for rendering map, Module not found: Error: Can't resolve 'esri/Map'
这是存储库
https://github.com/phanivaranasi/mancycle
此应用程序是使用 react + typescript + webpack 构建的..
尝试渲染地图,使用 ArcGIS 和 webpack
但出现错误 未找到模块:错误:无法解析 'esri/Map'
参考https://github.com/Esri/jsapi-resources/tree/master/4.x/webpack/demo as mentioned in youtube tutorial https://www.youtube.com/watch?v=P0oZWJkYKXg
请帮助我解决问题。
error screenshot
您在 webpack 配置的 resolve
部分中遗漏了这个:
alias: {
"esri": path.resolve(__dirname, 'node_modules/arcgis-js-api/')
}
这是存储库 https://github.com/phanivaranasi/mancycle
此应用程序是使用 react + typescript + webpack 构建的..
尝试渲染地图,使用 ArcGIS 和 webpack
但出现错误 未找到模块:错误:无法解析 'esri/Map'
参考https://github.com/Esri/jsapi-resources/tree/master/4.x/webpack/demo as mentioned in youtube tutorial https://www.youtube.com/watch?v=P0oZWJkYKXg
请帮助我解决问题。
error screenshot
您在 webpack 配置的 resolve
部分中遗漏了这个:
alias: {
"esri": path.resolve(__dirname, 'node_modules/arcgis-js-api/')
}