Skip to content

Wrong notation for SvelteKit for .env variables #39456

@iarata

Description

@iarata

Improve documentation

Link

Use Supabase with SvelteKit

Describe the problem

The docs for setting up Supabase for SvelteKit mentions to define the .env variables as VITE_PUBLIC_SUPABASE_URL and VITE_PUBLIC_SUPABASE_PUBLISHABLE_KEY but then accessing them from $env/static/public results in an issue due to the requirement of PUBLIC_ prefix

Describe the improvement

The .env variables, if they're safe to be exposed publicly should be renamed to:

  • PUBLIC_VITE_SUPABASE_URL
  • PUBLIC_VITE_SUPABASE_PUBLISHABLE_KEY

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions