New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: codesandbox not support slash import #16509
Conversation
Codecov Report
@@ Coverage Diff @@
## master #16509 +/- ##
=======================================
Coverage 95.71% 95.71%
=======================================
Files 258 258
Lines 7120 7120
Branches 1970 1994 +24
=======================================
Hits 6815 6815
Misses 303 303
Partials 2 2 Continue to review full report at Codecov.
|
Deploy preview for ant-design ready! Built with commit cb30ad8 |
@@ -15,7 +15,7 @@ A complete multiple select sample with remote search, debounce fetch, ajax callb | |||
|
|||
```jsx | |||
import { Select, Spin } from 'antd'; | |||
import debounce from 'lodash/debounce'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
为什么不改成 import debounce from 'lodash.debounce'
呢
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
想了下,这样增加不少依赖,每使用一个就得加一个。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import debounce from 'lodash/debounce';
体积小很多,推荐这么写。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
codesandbox 的问题要想个别的办法解决。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
改进下这里 https://github.com/ant-design/ant-design/blob/master/site/theme/template/Content/Demo.jsx#L178-L187 找 dependencies 的逻辑吧
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
有 lodash 的话,直接把 lodash external 出来
修好,这个 issue 可以一起处理了 #16514 |
顺便看看 #16514 |
原本例子问题另起讨论,这个解决了就可以合了。 |
Close #16514.
🤔 This is a ...
👻 What's the background?
https://ant.design/components/select-cn/#components-select-demo-select-users
View rendered components/select/demo/select-users.md
View rendered components/transfer/demo/table-transfer.md