SSR mismatch warning
I faced one problem with SSR: there's a mismatch which says server code doesn't contain path inside svg element.
Hi, can you provide more detailed inforomation ?
Some react developers use Ant Design Component in a Server Side Render project such as react-dom/server or next.js.
The server rendering required the react component tree is the same between Server Side Rendering/Client Side Hydration. If not, the browser console will emit a warning like this:
Warning: Did not expect server HTML to contain a `<Child>` in `<Parent>`
in which
ChildandParentdenotes to the CSR components that are rendered differently in SSR.
So I am considering it is the problem that the webpack loader makes the @ant-design/icons different between server and browser compilation.
You can reproduce the issue when using next.js.
I suggest that making an alias resolver in webpack config for @ant-design/icons temporarily that only exports the icons used in your project, if you want tree shaking feature for ant icons. Or otherwise ignore that warnings.
Yes, you are right, i will add feature to resovle it.