Closed phil-cv closed 1 month ago
Because the project doesn't implements critical CSS (and no compelling reason to), the craft.vite.script() function should include false as a second parameter to ensure CSS doesn't load asynchronously and cause a flash of unstyled content:
false
{{ craft.vite.script("src/js/app.js", false) }}
See https://nystudio107.com/docs/vite/#using-vite for details.
Hi! Oh wow, thanks very much for reporting! 💡
Because the project doesn't implements critical CSS (and no compelling reason to), the craft.vite.script() function should include
false
as a second parameter to ensure CSS doesn't load asynchronously and cause a flash of unstyled content:{{ craft.vite.script("src/js/app.js", false) }}
See https://nystudio107.com/docs/vite/#using-vite for details.