Help Center / Components

Edge Functions Migration

Supabase Edge Functions are server-side TypeScript functions that run on the edge, close to your users. The Edge Functions component migrates your functions from one Supabase instance to another, including their source code and configuration.

What Gets Migrated

When you select the Edge Functions component, Stack2X transfers:

  • Function source code -- The complete TypeScript/JavaScript source for each Edge Function is copied to the destination.
  • Function configuration -- Settings like the function name, import map configuration, and verification requirements.
  • Deployment status -- Functions are deployed on the destination so they are ready to handle requests immediately after migration.

Plan Availability

Edge Functions migration is available on the Pro plan and above. This component is not included in the Free or Starter tiers.

Tips and Considerations

  • Environment variables. Edge Functions often rely on environment variables and secrets (like API keys or database URLs). These are handled separately by the Secrets component. If your functions depend on specific secrets, include the Secrets component in your migration as well.
  • Hardcoded URLs. If your Edge Functions contain hardcoded references to your source Supabase project URL or API keys, you will need to update those values after migration. The best practice is to use environment variables instead of hardcoded values.
  • Third-party dependencies. Edge Functions that import external packages will continue to work as long as those packages are available from the same registries. Stack2X does not modify import paths.
  • Testing. After migration, invoke each Edge Function on the destination to verify it responds correctly. Check the function logs in the Supabase dashboard if anything behaves unexpectedly.
  • Pair with Secrets. For a complete function migration, select both Edge Functions and Secrets. This ensures your functions have access to all the environment variables they need on the new instance.