使用antd创建的工程,编译含有@arcgis/core依赖包的工程出错!有什么办法解决么? #8815
EvanJonQiu
started this conversation in
General
Replies: 1 comment
-
检查你的webpack版本,arcgis js api2.24版本开始只支持webpack4.0以上的版本了。或者直接启用mfsu |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
问题描述:
使用antd创建的工程,编译含有@arcgis/core依赖包的工程出错!
具体工程环境:
"dependencies": {
"@ant-design/icons": "^4.7.0",
"@ant-design/pro-layout": "^6.5.0",
"@arcgis/core": "^4.24.7",
"antd": "^4.21.5",
"axios": "^0.27.2",
"react": "17.x",
"react-dom": "17.x",
"umi": "^3.5.26"
},
"devDependencies": {
"@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0",
"@umijs/preset-react": "1.x",
"@umijs/test": "^3.5.26",
"lint-staged": "^10.0.7",
"prettier": "^2.2.0",
"typescript": "^4.1.2",
"yorkie": "^2.0.0"
}
输出的错误:(因为很长,前面的没截取到)
ypeIdField","types"])],Ze.prototype,"readVersion",null),e([D({type:Boolean,json:{origins:{"portal-item":{write:{target:"layerDefinition.defaultVisibility"}}}}})],Ze.prototype,"visible",void 0),e([A("portal-item","visible",["visibility","layerDefinition.defaultVisibility"])],Ze.prototype,"readVisible",null),Ze=e([M("esri.layers.FeatureLayer")],Ze);const $e=R({types:l}),Ke=Ze;export{Ke as default};
|
@ ./src/pages/index.tsx 21:0-60 177:20-32 216:20-32
@ ./src/.umi/core/routes.ts
@ ./src/.umi/umi.ts
@ multi ./node_modules/umi/node_modules/@umijs/preset-built-in/bundled/@pmmmwh/react-refresh-webpack-plugin/client/ReactRefreshEntry.js ./src/.umi/umi.ts
ERROR in ./node_modules/@arcgis/core/layers/graphics/OptimizedGeometry.js 5:51
Module parse failed: Unexpected token (5:51)
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.
| */
Beta Was this translation helpful? Give feedback.
All reactions