-
-
Notifications
You must be signed in to change notification settings - Fork 46.7k
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
[v5] remove es
dir for better import
#36395
Comments
Why not |
I like |
import Button from 'antd/button'; 这种不觉得啰嗦吗?一大堆import。。 直接解构啊。。多简洁 |
Sorry for not reply in time. I agree that I'm talking about some edge cases which have to import from es modules. Those will seems more trivial to import from The main concept is that since we don't need to tell from Some cases that I can imagine: 1. tree shaking without babel plugin. 2. import ts type from inner dirs. 3. some advanced usage of inner utils. |
关于你说的这个问题,我深表理解。 题主之所以不喜欢 在 若改成 但这种写法,实在是很啰嗦,好在,有一个插件 其实它就是
另外,这个问题其实并不关 |
es
dir for better importes
dir for better import
For clarification, in antd@v5, we may drop So I'm talking about the further change after we drop If we decide that we will support |
由于我们仍需要保留 dist 等文件夹,关闭此 issue |
What problem does this feature solve?
Since we want to remove
lib
and focus on ESM only, it is better removees
dir.Then we can:
instead of:
and have a better tree shaking experience.
What does the proposed API look like?
The text was updated successfully, but these errors were encountered: