Releases: mcansh/remix-fastify
@mcansh/[email protected]
Minor Changes
- 6d074ed: return streams directly from remix to fastify
Patch Changes
- 352c74f: New optional parameter to customize the
@fastify/static
plugin options. This can be useful to customize options likedecorateReply
orsetHeaders
to match your needs or when you already have a@fastify/static
plugin registered. - bd2a09c: New optional parameter to provide a custom server build for production. If not provided, it will be loaded using
import()
with the server build path provided in the options.
@mcansh/[email protected]
Patch Changes
-
be05e8b: The Remix Vite plugin allows you to customize the filename. This change allows you to pass a custom server file name to the Fastify plugin
// vite.config.ts export default defineConfig({ plugins: [remix({ serverFilename: "example.js" })], });
// server.js await app.register(remixFastify, { serverFilename: "example.js", });
@mcansh/[email protected]
@mcansh/[email protected]
What's Changed
- fix: use file urls for esm by @VIEWVIEWVIEW in #342
- feat(examples): use Typescript in example
vite
by @nwleedev in #310 - feat: accept and forward Vite dev server options by @qwright10 in #347
- chore: Update version for release by @mcansh in #350
New Contributors
- @VIEWVIEWVIEW made their first contribution in #342
- @nwleedev made their first contribution in #310
- @qwright10 made their first contribution in #347
Full Changelog: https:/mcansh/remix-fastify/compare/@mcansh/[email protected]...@mcansh/[email protected]
@mcansh/[email protected]
Patch Changes
-
a7fcb6d: allows you to customize the cache control for both the files in the build directory as well as your public directory if you need to. using
pretty-cache-header
under the hood so things like1y
or30 days
will workawait app.register(remixFastify, { assetCacheControl: {}, defaultCacheControl: {}, });
-
a7fcb6d: fix cache control so that build assets are immutable and cached for 1 year instead of everything being cached for 1 hour
@mcansh/[email protected]
Minor Changes
-
597df2e: re-introduce plugin for easy configuration, we're still publicly exporting all the pieces, so you can still continue to configure your server as you do today.
import { remixFastify } from "@mcansh/remix-fastify"; import { installGlobals } from "@remix-run/node"; import { fastify } from "fastify"; installGlobals(); let app = fastify(); await app.register(remixFastify); let port = Number(process.env.PORT) || 3000; let address = await app.listen({ port, host: "0.0.0.0" }); console.log(`✅ app ready: ${address}`);
and if you need to configure loadContext, you can do so like this:
import { remixFastify } from "@mcansh/remix-fastify"; import { installGlobals } from "@remix-run/node"; import { fastify } from "fastify"; installGlobals(); let app = fastify(); await app.register(remixFastify, { getLoadContext(request, reply) { return {}; }, }); let port = Number(process.env.PORT) || 3000; let address = await app.listen({ port, host: "0.0.0.0" }); console.log(`✅ app ready: ${address}`);
Patch Changes
@mcansh/[email protected]
Patch Changes
-
9300c22: feat: allow http2/https servers
previously using
fastify({ http2: true })
orfastify({ https: {...} })
resulted in type errors for the handler when passing the request
this has been fixed by passing the server type to all uses of the request and reply internally
this PR allows any server that extends
http.Server | https.Server | http2.Http2Server | http2.Http2SecureServer;
@mcansh/[email protected]
Patch Changes
- d11803a: remove
criticalCss
option from createRequestHandler as it's now handled by the vite plugin in an agnostic way
@mcansh/[email protected]
Patch Changes
- add5583: remove
criticalCss
option from createRequestHandler as it's now handled by the vite plugin in an agnostic way
@mcansh/[email protected]
Minor Changes
- 1d708dc: add support for inlining criticalCss when using the vite plugin