Write Edge Functions in pure JavaScript instead of using TypeScript

Nov 5, 2024

From Supabase CLI version 1.215.0 or higher you can configure a custom entrypoint to your Edge Functions. This can be used to write Edge Functions in pure JavaScript instead of TypeScript.

Save your Function as a JavaScript file (eg: index.js) and then update the supabase/config.toml as follows:


_10
[functions.hello-world]
_10
# other entries
_10
entrypoint = './functions/hello-world/index.js' # path must be relative to config.toml

You can use any .ts, .js, .tsx, .jsx or .mjs file as the entrypoint for a Function.

More details: https://supabase.com/docs/guides/functions/quickstart#not-using-typescript

Build in a weekend, scale to millions