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
Question: Excluding antd lib normalize.less from the build #4998
Comments
Try webpack external. |
But it may break antd's components' style. |
Hi @benjycui We try to use antd in a quite large enterprise applicationm, but when antd gets applied it inserts normalize.css into the DOM without any namespacing or so. Thus e.g. our Can you please provide me an example for your suggestion:
I've tried to exclude it from less/style loader like this but it did not work: What should be written to the externals? We have these currently in it: Thanks in advance. |
Actually, we can adopt |
The issue is still not solved. Can you point out to the solution please ? |
This issue should definitely not be closed. The problem is real and persists. The styles should be prefixed and not affect the entire page. |
reset.css has impact on my code .... |
Is there any progress on this issue? |
trace #5851 |
This is rather a question than an issue by itself.
I've built a small plugin for a third party service. This plugin uses antd for its design elements. However, the natural problem is that antd includes
normalize.less
into the final build, which in turn messes with the original page css settings by overriding them.Would there be a way to specify a means to exclude specific
*.less
files?One of the solutions that I currently am using is just reading the
document.head
and picking the generated style node, where I just clean up the unnecessary CSS through regex. But it seems like a hassle to run a prep script each before each initialisation of the app.The text was updated successfully, but these errors were encountered: