Skip to content

v2.1.2

Compare
Choose a tag to compare
@rphlmr rphlmr released this 28 Nov 11:20
· 4 commits to main since this release
7f57050

What's Changed

Breaking change for Cloudflare

You need to install these packages too:

npm install -D miniflare wrangler

2.1.0

Bun

Tip

Check this example to see how to use it.

// vite.config.ts
import { reactRouter } from "@react-router/dev/vite";
import { reactRouterHonoServer } from "react-router-hono-server/dev"; // add this
import { defineConfig } from "vite";
import tsconfigPaths from "vite-tsconfig-paths";

export default defineConfig({
  plugins: [
    reactRouterHonoServer({ runtime: "bun"} ), // add this
    reactRouter(),
    tsconfigPaths()
  ],
});

More doc about Bun

Cloudflare Workers

Tip

Check this example to see how to use it.

Important

You need to add the cloudflareDevProxy plugin to use the Cloudflare Workers runtime on dev.

// vite.config.ts
import { reactRouter } from "@react-router/dev/vite";
import { cloudflareDevProxy } from "@react-router/dev/vite/cloudflare"; // add this
import { reactRouterHonoServer } from "react-router-hono-server/dev"; // add this
import { defineConfig } from "vite";
import tsconfigPaths from "vite-tsconfig-paths";

export default defineConfig({
  plugins: [
    cloudflareDevProxy(),
    reactRouterHonoServer({ runtime: "cloudflare"} ), // add this
    reactRouter(),
    tsconfigPaths()
  ],
});

More doc about Cloudflare

Full Changelog: v2.1.0...v2.1.2