sapphi-red / vite-plugin-static-copy

rollup-plugin-copy with dev server support.
MIT License
297 stars 32 forks source link

fix: use destination path for `Content-Type` header #121

Closed tobz1000 closed 5 months ago

tobz1000 commented 5 months ago

Uses the target path to determine content-type instead of the source path. The content-type sent from a dev server should match that sent from a preview-mode server.

This PR also updates the content-type value for script files to text/javascript, to match that used by mrmime: https://github.com/lukeed/mrmime/issues/8

Small update/refactor to the test code.

Fixes #119.

changeset-bot[bot] commented 5 months ago

🦋 Changeset detected

Latest commit: e81222e607761f401cfff28c2d1094be83964762

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR