Skip to content

Releases: rphlmr/react-router-hono-server

v0.4.0

21 Oct 13:29
e33ed37
Compare
Choose a tag to compare

What's Changed

  • 🐛 FIX: Importing from the public folder no longer produces a console error. by @rphlmr in #12

Full Changelog: v0.3.0...v0.4.0

v0.3.0

18 Oct 18:15
e28d86e
Compare
Choose a tag to compare

What's Changed

  • chorse: updated hono to latest version & fixed vulnurabilities by @DonKoko in #11

New Contributors

Full Changelog: v0.2.0...v0.3.0

v0.2.0

10 Sep 09:51
0525b20
Compare
Choose a tag to compare

What's Changed

Fixes

#7
#8

Full Changelog: v0.1.0...v0.2.0

v0.1.0

22 Aug 14:24
1b95053
Compare
Choose a tag to compare

What's Changed

  • enable to pass Hono constructor options by @rphlmr in #6

Full Changelog: v0.0.4...v0.1.0

v0.0.4

13 Aug 10:55
deb3f18
Compare
Choose a tag to compare

What's Changed

  • fix Wrong types for exclude property #4 by @rphlmr in #5

Full Changelog: v0.0.3...v0.0.4

v0.0.3

06 Aug 19:20
bbd0c03
Compare
Choose a tag to compare

What's Changed

New Contributors

  • @rphlmr made their first contribution in #1

Full Changelog: v0.0.2...v0.0.3

v0.0.2

04 Aug 12:14
3fdd810
Compare
Choose a tag to compare

Full Changelog: v0.0.1...v0.0.2

v0.0.1

04 Aug 12:04
89c2b8d
Compare
Choose a tag to compare

Hey 👋 this is the initial release.

Installation

Install the following npm package. NOTE: This is not a dev dependency, as it
creates the Hono server used in production.

npm install hono remix-hono react-router-hono-server

Configuration

Create the server

From your entry.server.tsx file, export the server from createHonoServer and
name it server or the name you defined in devServer({exportName}) in your vite.config.ts.

// app/entry.server.tsx

import { createHonoServer } from "react-router-hono-server/node";

export const server = await createHonoServer();

Add the Vite plugin

// vite.config.ts

import { vitePlugin as remix } from "@remix-run/dev";
import { installGlobals } from "@remix-run/node";
import { devServer } from "react-router-hono-server/dev";
import { defineConfig } from "vite";
import tsconfigPaths from "vite-tsconfig-paths";

installGlobals();

export default defineConfig({
  build: {
    target: "esnext",
  },
  plugins: [devServer(), remix(), tsconfigPaths()],
});

Update package.json scripts

  "scripts": {
    "build": "NODE_ENV=production remix vite:build",
    "dev": "vite --host",
    "start": "NODE_ENV=production node ./build/server/index.js"
  },