My website is working fine until I enable “Assets optimization” setting in Netlify. Whenever I enable this option, the website is giving a totally broken appearance. I understood this is happening because netlify is rewriting asset files URL’s in my HTML pages. For example, if my original stylesheet URL is www.example.com/assets/stylesheet/main.min.css, netlify replaces it with something like www.dwqeb3923.cloudfront.net/…js. When I open these cloudfront URL’s in browser, it just returns a blank page. Original URL’s are working fine.
Now I disabled “assets optimization” and site is working fine again (But loading too slow). I played with the setting a few times toggling it ON-OFF across different sites. Every time I turned ON, it’s definitely breaking the site.