multipart-parser v0.14.0
- Move
@remix-run/headerstopeerDependencies
lazy-file v4.2.0
- Move
@remix-run/mimetopeerDependencies
static-middleware v0.4.0
-
BREAKING CHANGE: Replace
mrmimedependency with@remix-run/mimefor MIME type detection which is now a peer dependency. -
Add support for
acceptRangesfunction to conditionally enable HTTP Range requests based on the file being served:// Enable ranges only for large files staticFiles('./public', { acceptRanges: (file) => file.size > 10 * 1024 * 1024, }) // Enable ranges only for videos staticFiles('./public', { acceptRanges: (file) => file.type.startsWith('video/'), })
fs v0.2.0
- Replaced
mrmimedependency with@remix-run/mimefor MIME type detection
lazy-file v4.1.0
- Replaced
mrmimedependency with@remix-run/mimefor MIME type detection
headers v0.18.0
- Add
Varysupport
import { Vary } from '@remix-run/headers'
let header = new Vary('Accept-Encoding')
header.add('Accept-Language')
header.headerNames // ['accept-encoding', 'accept-language']
header.toString() // 'accept-encoding, accept-language'-
Accept.getPreferred(),AcceptEncoding.getPreferred(), andAcceptLanguage.getPreferred()are now generic, preserving the union type of the input array in the return type
response v0.2.0
-
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.
compression-middleware v0.1.0
Initial release of this package.
See the README for more details.
mime v0.1.0
Initial release of this package.
See the README for more details.