Skip to content

Latest commit

 

History

History
37 lines (26 loc) · 1.28 KB

File metadata and controls

37 lines (26 loc) · 1.28 KB

Remix Edge Adapter for Netlify

The Remix Edge Adapter for Netlify allows you to deploy your Remix app to Netlify Edge Functions.

Usage

It is strongly advised to use the Netlify Remix template to create a Remix site for deployment to Netlify. See Remix on Netlify for more details and other options.

However, if you are using Remix Vite, you can instead deploy your existing site to Netlify by following these steps:

  1. Add dependencies on @netlify/remix-edge-adapter and @netlify/remix-runtime
  2. Use the Netlify Remix edge Vite plugin in your Vite config:
// vite.config.js
import { vitePlugin as remix } from "@remix-run/dev";
import { netlifyPlugin } from "@netlify/remix-edge-adapter/plugin";

export default defineConfig({
  plugins: [remix(), netlifyPlugin(),
});
  1. Add an app/entry.jsx (.tsx if using TypeScript) with these contents:
// app.entry.jsx or .tsx
export { default } from 'virtual:netlify-server-entry'

Hydrogen

Hydrogen Vite sites are supported and automatically detected. However, additional setup is required. See https://github.com/netlify/hydrogen-template for details.