antd-mobile does not contain an export
See original GitHub issueVersion
1.1.3
Environment
react (web browsers)
Reproduction link
https://codesandbox.io/s/013KDJPN
Steps to reproduce
- I’ve run
npm install antd-mobile --save
on a new project - I’ve imported the following code:
import React, { Component } from 'react';
import { Button } from 'antd-mobile';
class HomePage extends Component {
render() {
return (
<Button type="primary">test</Button>
);
}
}
export default HomePage;
What is expected?
That I see the antd-mobile elements
What is actually happening?
It cannot import elements from ‘antd-mobile’
Issue Analytics
- State:
- Created 6 years ago
- Comments:24 (12 by maintainers)
Top Results From Across the Web
Attempted import error: 'Icon' is not exported from 'antd'
On upgrading the version of Ant Design to v4, one of the major breaking changes have been that Icon is no longer exported...
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 >Result - Ant Design
Use when important operations need to inform the user to process the results and the feedback is more complicated. Examples.
Read more >Getting Started - Ant Design
Import on Demand ... antd supports tree shaking of ES modules, so using import { Button } from 'antd'; would drop js code...
Read more >Use in create-react-app - Ant Design
Below is the default directory structure. ... Now we install antd from yarn or npm. ... Modify src/App.js , import Button component from...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Same issue occurred when I executed “yarn build”
@yarnball in your html file header, for example : https://github.com/ant-design/antd-mobile-samples/blob/master/web-webpack/index.html#L7