question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Failed to parse source map: 'webpack://antd/./components/config-provider/style/index.less' URL is not supported

See original GitHub issue
  • I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

https://github.com/sauldeleon/antd-webpack5-repro

Steps to reproduce

  • clone this repo
  • run npm i
  • run npm start
  • check the logs in the console

What is expected?

React start the application with no warning issues. In certain environments, warning issues are not supported and will crash the build for production environments

What is actually happening?

Webpack 5 throws errors due to loading URL for less files Edit: as @YouWillBe said, this is due to using react-scripts 5.0.0 which uses webpack 5

Failed to parse source map: ‘webpack://antd/./components/config-provider/style/index.less’ URL is not supported Failed to parse source map: ‘webpack://antd/./components/icon/style/index.less’ URL is not supported Failed to parse source map: ‘webpack://antd/./components/locale-provider/style/index.less’ URL is not supported Failed to parse source map: ‘webpack://antd/./components/time-picker/style/index.less’ URL is not supported

Environment Info
antd 4.17.3
React 17.0.2
System All systems
Browser Chrome 96.0.4664.110

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:35
  • Comments:60 (1 by maintainers)

github_iconTop GitHub Comments

1014reactions
ppegucommented, May 22, 2022

Solution :

- import 'antd/dist/antd.css replace with + import 'antd/dist/antd.min.css

Thanks for all your love. Please follow me on GitHub

26reactions
youwillbecommented, Dec 16, 2021

react-script 升级到5.0.0之后出现此问题,也就是说从14号开始,所有通过npx create-react-app 创建的项目,引入antd.css 之后都会看到这个警告

Read more comments on GitHub >

github_iconTop Results From Across the Web

Antd source map not supported in React - Stack Overflow
This problem occurred after react-script was upgraded to 5.0.0 solution : - import 'antd/dist/antd.css. replace with :
Read more >
搜索 - CSDN博客
React18.x引入antd4.x的css后index.less' Failed to parse source map: 'webpack:URL is not supported. 报错问题(下方有解决方案):
Read more >
코딩 | 개념 정리/React - PatienceLee - 티스토리
Failed to parse source map: 'webpack://antd/./components/time-picker/style/index.less' URL is not supportt supported. PatienceLee 2022. 7.
Read more >
Source Maps - SurviveJS
Webpack supports a wide variety of source map types. These vary based on quality and build speed. For now, you enable source-map for...
Read more >
'webpack://antd/./components/config-provider/style/index.less ...
Failed to parse source map: 'webpack://antd/./components/time-picker/style/index.less' URL is not supported ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found