Skip to content

Releases: mcansh/remix-fastify

@mcansh/[email protected]

13 Aug 23:28
8d66a13
Compare
Choose a tag to compare

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 like decorateReply or setHeaders 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]

12 Jul 22:01
d5d9e7b
Compare
Choose a tag to compare

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]

14 Jun 17:39
cb939fe
Compare
Choose a tag to compare

Patch Changes

  • b83f33c: allows you to customize Vite dev server options. useful for reusing the fastify http(s) server for hmr in development
  • 822b878: use file urls for esm for windows compatibility

@mcansh/[email protected]

14 Jun 12:05
@mcansh/[email protected]
967d85e
Compare
Choose a tag to compare
Pre-release

What's Changed

New Contributors

Full Changelog: https:/mcansh/remix-fastify/compare/@mcansh/[email protected]...@mcansh/[email protected]

@mcansh/[email protected]

25 Apr 21:54
@mcansh/[email protected]
5b4b3d3
Compare
Choose a tag to compare

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 like 1y or 30 days will work

    await 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]

25 Apr 14:51
@mcansh/[email protected]
f536e6a
Compare
Choose a tag to compare

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

  • 90c6c61: changeset for #324

    bump dependencies to the latest versions

@mcansh/[email protected]

03 Feb 00:03
eaaff4a
Compare
Choose a tag to compare

Patch Changes

  • 9300c22: feat: allow http2/https servers

    previously using fastify({ http2: true }) or fastify({ https: {...} }) resulted in type errors for the handler when passing the request
    image

    this has been fixed by passing the server type to all uses of the request and reply internally
    image

    this PR allows any server that extends http.Server | https.Server | http2.Http2Server | http2.Http2SecureServer;

@mcansh/[email protected]

13 Dec 23:16
3cac5a0
Compare
Choose a tag to compare

Patch Changes

  • d11803a: remove criticalCss option from createRequestHandler as it's now handled by the vite plugin in an agnostic way

@mcansh/[email protected]

23 Nov 18:58
d2860d1
Compare
Choose a tag to compare
Pre-release

Patch Changes

  • add5583: remove criticalCss option from createRequestHandler as it's now handled by the vite plugin in an agnostic way

@mcansh/[email protected]

21 Nov 21:38
a72b9c0
Compare
Choose a tag to compare

Minor Changes

  • 1d708dc: add support for inlining criticalCss when using the vite plugin