Skip to content

Hydrogen support for Netlify Edge Functions

Notifications You must be signed in to change notification settings

rodsotdia/hydrogen-platform

 
 

Repository files navigation

Hydrogen on Netlify Edge Functions

This package is a Hydrogen platform that allows you to deploy your site to Netlify Edge Functions.

Installation

npm i -D @netlify/hydrogen-platform

Then add the plugin to your Vite config:

// vite.config.js

import { defineConfig } from 'vite'
import hydrogen from '@shopify/hydrogen/plugin'
import netlifyPlugin from '@netlify/hydrogen-platform/plugin'

export default defineConfig({
  plugins: [hydrogen(), netlifyPlugin()],
  //   ...
})

Then when you run shopify hydrogen build it will generate the correct files to deploy to Netlify Edge.

Netlify detects Hydrogen sites, so you should have the correct settings already, but if you need to set them manually you can use the netlify.toml or Netlify UI to do so:

# netlify.toml
[build]
command = "npm run build"
publish = "dist/client"

About

Hydrogen support for Netlify Edge Functions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 65.3%
  • JavaScript 34.7%