-
Notifications
You must be signed in to change notification settings - Fork 27.6k
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
Improve example of with-ant-design-less #4582
Comments
Hi @nenjamin2405, regarding your first issue, I got HMR of antd LESS overrides working by defining a custom |
Thanks for your support @delikat, but with that implementation, I already had a problem in page loading time (performance issue) while navigating between pages, due to the fact that it must repeatedly import a whole Antd less file in every single page. So I am really confused and wonder what is the proper way in using Antd that meet my above requirements (import and load ant design layout once in _app.js or _document.js, then each page has its own less file which doesn't contain ant design import in it). |
wired, same problem |
Any update on this? |
quite painful, still issues... |
So why not contribute to the example? 🤔 |
@timneutkens - Yeah, I know good point. Been trying to figure this out. Looks like custom less is fine to compile with HMR, but the theme-ing (vars) with 'antd' has the HMR issue. Came across this article where I tried to implement the "yarn add antd-theme-webpack-plugin", but still not luck. Gonna do a working repo, hopefully once fixed.. |
Has anyone found a workaround? |
We should be using modularized ant-design with this babel config:
I've been trying to get it to work but with no luck. With the inclusion of the
I've been trying to make babel-preset-env work for it to work with es modules but it doesn't seem to work. Can anyone chime in? |
Duplicate of #9830 |
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Bug report
Describe the bug
The with-ant-design-less example is lack off hot reloading and client-side rendering for css
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
Hot reloading problem:
Client-side rendering for css:
Expected behavior
I really appreciate if anyone can tell me the appropriate way to use Ant design in Next.js with custom less style with hot reloading, client-side rendering by answering the questions below:
style
tag), but the ant design icon part not working.System information
The text was updated successfully, but these errors were encountered: