Releases: mcansh/remix-fastify
@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
@mcansh/[email protected]
Minor Changes
- a5ee9f1: add support for inlining criticalCss when using the vite plugin
example usage: https://github.com/mcansh/remix-fastify/blob/main/examples/unstable-vite/server.js#L66-L95
@mcansh/[email protected]
@mcansh/[email protected]
@mcansh/[email protected]
Patch Changes
- 1484ec4: Uses the normalized path for
filePublicPath
.