Skip to content

Add Accept header to requests in NetworkLoader#1

Closed
ElMassimo wants to merge 1 commit intomasterfrom
mime
Closed

Add Accept header to requests in NetworkLoader#1
ElMassimo wants to merge 1 commit intomasterfrom
mime

Conversation

@ElMassimo
Copy link
Owner

@ElMassimo ElMassimo commented Jun 22, 2021

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 ElMassimo/vite_ruby#93 (comment)

This allows development servers to serve the correct file type.

For more information see ElMassimo/vite_ruby#93 (comment)
@ElMassimo ElMassimo closed this Jun 22, 2021
@ElMassimo ElMassimo deleted the mime branch October 17, 2022 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant