dev-log.js?63d4:9 [antd-mobile: Global] The px tester is not rendering properly. Please make sure you have imported `antd-mobile/es/global`

See original GitHub issue

Version of antd-mobile

5.0.0-rc.2

Operating system and its version

Others

Browser and its version

No response

Sandbox to reproduce

No response

What happened?

No response

Relevant log output

dev-log.js?63d4:9 [antd-mobile: Global] The px tester is not rendering properly. Please make sure you have imported `antd-mobile/es/global`

使用 "antd-mobile": "5.0.0-rc.2", ImageUploader组件  在入口文件 已经import 'antd-mobile/es/global';

还是报这个错误

Code of Conduct

  • I agree to follow this project’s Code of Conduct

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
huaTJ0210commented, Feb 9, 2022

css-loader启用CSS 模块就会报上述错误: { loader: ‘css-loader’, options: { modules:true } } 暂时方案:如果想开启CSS模块,可以使用less、sass,单独对less、sass文件配置loader启用CSS 模块;

2reactions
chaiguanpengcommented, Dec 7, 2021

在webpack的 module中rules配置下这个试试,antd-mobil的组件是基于css写的,.css文件需要配置下loader module: { rules: [ {test:/\.css$/,use:['style-loader','css-loader']}, ] }

Read more comments on GitHub >

github_iconTop Results From Across the Web

Jtest [antd-mobile: Global] The px tester is not rendering ...
Jtest [antd-mobile: Global] The px tester is not rendering properly. Please make sure you have imported antd-mobile/es/global . #5192.
Read more >
Ant-Design CSS not loading properly - Stack Overflow
Just import this file in your jsx file or js file: If you import it in App.jsx file once then no need to...
Read more >
FAQ - Ant Design
Here are the frequently asked questions about Ant Design and antd that you should look up before you ask in the community or...
Read more >
antd_demo: ant design - Gitee
This test mounts a component and makes sure that it didn't throw during rendering. Tests like this provide a lot of value with...
Read more >
FAQ - Ant Design
Here are the frequently asked questions about Ant Design and antd that you should look up ... Please make sure that you import...
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