-
BREAKING CHANGE: Add
@remix-run/mimeas a peer dependency. This package is used by thecreateFileResponse()response helper to determine if HTTP Range requests should be supported by default for a given MIME type. -
Add
compressResponsehelper -
The
createFileResponse()response helper now only enables HTTP Range requests by default for non-compressible MIME types. This allows text-based assets to be compressed while still supporting resumable downloads for media files.To restore the previous behavior where all files support range requests:
return createFileResponse(file, request, { acceptRanges: true, })
Note: Range requests and compression are mutually exclusive. When
Accept-Ranges: bytesis present in response headers, thecompress()response helper andcompression()middleware will not compress the response.