I am using vite to build my react app, recently i noticed that the count of DOM nodes(in chrome performance monitor) in build is significantly higher(13k) vs dev server(4.5k).
Further to track down the source of issue, i removed everything and just rendered a div.
ReactDOM.createRoot(document.getElementById("root")!).render(
<div>hello world</div>
);
But i see that problem still exists.
The DOM node count on build was 311
node count in build
vs the DOM node count in dev 251.
node count in dev
What could be the reason behind this gap?
Please note that I have reported DOM node count after doing garbage collection in each case.