Hi fynd team, i came accross 2 types of script one is themebundel.common.js and themebundle.umd_min.js. so my question is how are these 2 difference and how are these being used.
secondly , how are we loading themebundle in csr and ssr ?
themebundle.common.js
is a CommonJS module suited for Node.js environments.
themebundle.umd_min.js
is a UMD module that works in both browser and Node.js environments and is minified for efficiency.
Client-Side Rendering (CSR)
In CSR, the themeBundle is loaded directly in the browser. You can include the necessary CSS and JavaScript files in your HTML file.
Server-Side Rendering (SSR)
In SSR, the themeBundle is loaded on the server and sent to the client as part of the rendered HTML.
Why are we using 2 different js? I mean both contents look the same. In both themebundle.umd_min.js and common.js we almost have the same content.