The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
Update import-maps.mdx to document deno.json (#32830)
Han Qiao16f950d6155d
diff --git a/apps/docs/content/guides/functions/import-maps.mdx b/apps/docs/content/guides/functions/import-maps.mdxindex 6fcaf870d68..b9abf701bf6 100644--- a/apps/docs/content/guides/functions/import-maps.mdx+++ b/apps/docs/content/guides/functions/import-maps.mdx@@ -51,11 +51,11 @@ In the Deno ecosystem, each function should be treated as an independent project- Makes deployments more predictable and maintainable- Allows for different versions of the same dependency across functions-For these reasons, we recommend maintaining separate configuration files (`deno.json`/`deno.jsonc`, `.npmrc`, or `import_map.json`) within each function's directory, even if it means duplicating some configurations.+For these reasons, we recommend maintaining separate configuration files (`deno.json`, `.npmrc`, or `import_map.json`) within each function's directory, even if it means duplicating some configurations.There are two ways to manage your dependencies in Supabase Edge Functions:-### Using deno.jsonc (recommended)+### Using deno.json (recommended)<Admonition type="info">@@ -63,7 +63,7 @@ This feature requires Supabase CLI version 1.215.0 or higher.</Admonition>-Each function should have its own `deno.jsonc` or `deno.json` file to manage dependencies and configure Deno-specific settings. This ensures proper isolation between functions and is the recommended approach for deployment. For a complete list of supported options, see the [official Deno configuration documentation](https://docs.deno.com/runtime/manual/getting_started/configuration_file).+Each function should have its own `deno.json` file to manage dependencies and configure Deno-specific settings. This ensures proper isolation between functions and is the recommended approach for deployment. For a complete list of supported options, see the [official Deno configuration documentation](https://docs.deno.com/runtime/manual/getting_started/configuration_file).```json supabase/functions/my-function/deno.json{@@ -80,24 +80,24 @@ The recommended file structure for deployment:├── functions│ ├── function-one│ │ ├── index.ts- │ │ ├─- deno.jsonc # Function-specific Deno configuration+ │ │ ├─- deno.json # Function-specific Deno configuration│ │ └── .npmrc # Function-specific npm configuration (if needed)│ └── function-two│ ├── index.ts- │ ├─- deno.jsonc # Function-specific Deno configuration+ │ ├─- deno.json # Function-specific Deno configuration│ └── .npmrc # Function-specific npm configuration (if needed)└── config.toml```<Admonition type="caution">- While it's possible to use a global `deno.json` or `deno.jsonc` in the `/supabase/functions`- directory for local development, this approach is not recommended for deployment. Each function- should maintain its own configuration to ensure proper isolation and dependency management.+ While it's possible to use a global `deno.json` in the `/supabase/functions` directory for local+ development, this approach is not recommended for deployment. Each function should maintain its+ own configuration to ensure proper isolation and dependency management.</Admonition>### Using import maps (legacy)-Import Maps are a legacy way to manage dependencies, similar to a `package.json` file. While still supported, we recommend using `deno.jsonc`. If both exist, `deno.jsonc` takes precedence.+Import Maps are a legacy way to manage dependencies, similar to a `package.json` file. While still supported, we recommend using `deno.json`. If both exist, `deno.json` takes precedence.Each function should have its own `import_map.json` file for proper isolation:@@ -161,7 +161,7 @@ To use private npm packages, create a `.npmrc` file within your function directo└── functions└── my-function├── index.ts- ├── deno.jsonc+ ├── deno.json└── .npmrc # Function-specific npm configuration```