The request type has deviated. Code that expects headers to have .get() on it is breaking.
This code is using remix-i18next
which parses the header to figure out the locale. This repo uses a fork for a PR sergiodxa/remix-i18next#155 because Vite does not like how the main line package is assembled for ESM.
๐ See the Remix Vite docs for details on supported features.
npx create-remix@nightly --template pcattori/remix-template-vite
Spin up a minimal Vite dev server:
npm run dev
Or build your app for production and run it:
npm run build
npm run start
Remix exposes APIs for integrating Vite with a custom server:
import {
unstable_createViteServer,
unstable_loadViteServerBuild,
} from "@remix-run/dev";
In this template, we'll use Express but remember that these APIs can be used with any Node-compatible server setup that supports standard middleware.
Spin up the Express server as a dev server:
npm run dev:express
Or build your app for production and run it:
npm run build
npm run start:express