Hello,
When I’m in development mode, webpack puts all the CSS in a javascript file and injects it in <head>
using a <style>
tag.
This is fine during development, but in production it comes with the downside where my HTML page “flickers” unstyled (the JS is loaded at the end of the page load) for a brief moment, which is annoying.
I know for sure that webpack can compile the CSS to their own file when deploying (did it once), but I can’t figure out if Phoenix has already a configuration prepared for that or it’s on me.
Currently, it doesn’t look like, it seems like it keeps injecting, but my project has been created a while ago, so the config might be outdated.