I am looking for inputs to manage Static Resources (CSS and JS files) in headless implementation.
Are you having single CSS and JS files for your Website and Components?
Using one CSS and JS file for website for required framework and
themes, and separate CSS and JS file for individual components?If separate CSS and JS files then how are you clubbing them into
Single CSS and JS file?How will you bundle individual components files added on page to avoid loading all components CSS and JavaScript files even they are not used?
By default include only base framework of Static Resources (CSS and JavaScript) and page specific components Static Resources (CSS and JavaScript) to avoid unnecessary static resources which are not being used so that we can improve page response
Application Details:
Sitecore Version: 10.1.1
Implementation: Headless
Client Side Framework: ReactJS
Deployment: Containers
Please share your thought process and suggestion to achieve above requirements.