premailer-rails
premailer-rails copied to clipboard
Add Accept header to requests in NetworkLoader
Description 📖
This pull request adds the Accept headers to requests made by the NetworkLoader strategy.
This allows development servers which can serve different file types—such as Vite.js—to serve a CSS file as expected.
This change should be backwards-compatible as any server that was previously responding with CSS content should continue to do so.
Background 📜
Vite.js can serve JS content for a given CSS file path, which allows it to provide hot-refresh for stylesheets.
For more information, see https://github.com/ElMassimo/vite_ruby/pull/93#issuecomment-865426710
I was about to open it, thanks !
Makes sense! Thanks for the PR.