From fcee483633da0c28470b090cabf4837ce5c85830 Mon Sep 17 00:00:00 2001 From: KentKong123 Date: Wed, 14 Jun 2023 21:48:51 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E5=9C=A8windows10=E4=B8=93=E4=B8=9A?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E4=B8=8B=E9=9D=A2antd4.20.5=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E6=8A=A5=E9=94=99=E4=BB=A5=E5=8F=8A=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E6=9C=80=E8=BF=91antd5.6.1=E7=89=88=E6=9C=AC=E5=90=8E=E7=9A=84?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 错误1:在windows10专业版本下面antd4.20.5版本报错:Failed to parse source map: 'webpack://antd/./components/config-provider/style/index.less' URL is not supported 错误2:使用npm更新最新版本antd5.6.1后,报错ERROR in ./src/index.js 7:0-28 Module not found: Error: Can't resolve 'antd/dist/antd.css' --- package.json | 2 +- src/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 99cf124..6de3cfa 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "dependencies": { "@ant-design/icons": "^4.7.0", "@xstate/react": "^3.0.0", - "antd": "^4.20.5", + "antd": "^5.6.1", "axios": "^0.27.2", "cross-spawn": "^7.0.3", "electron-is-dev": "^2.0.0", diff --git a/src/index.js b/src/index.js index 5a1ffb7..b995910 100644 --- a/src/index.js +++ b/src/index.js @@ -2,7 +2,7 @@ import React from 'react'; import ReactDOM from 'react-dom/client'; import App from './App'; -import 'antd/dist/antd.css'; +import 'antd/dist/antd.js.map'; const root = ReactDOM.createRoot(document.getElementById('root')); root.render(