Change8

response@0.2.0

Breaking Changes
📦 remixView on GitHub →
2 breaking2 features🔧 3 symbols

Summary

This release introduces a new compressResponse helper and updates createFileResponse to prioritize compression for text-based assets by conditionally disabling HTTP Range requests. It also introduces @remix-run/mime as a mandatory peer dependency.

⚠️ Breaking Changes

  • Added @remix-run/mime as a required peer dependency for createFileResponse().
  • createFileResponse() now disables HTTP Range requests by default for compressible MIME types (e.g., text-based assets) to allow for compression.

Migration Steps

  1. Install @remix-run/mime as a peer dependency in your project.
  2. To restore the previous behavior where all files support range requests regardless of MIME type, pass { acceptRanges: true } to the createFileResponse options.

✨ New Features

  • Added compressResponse helper.
  • createFileResponse() now automatically determines whether to enable Range requests based on MIME type compressibility.

🔧 Affected Symbols

createFileResponsecompressResponse@remix-run/mime