Skip to content

Start not loading environment variables from .env.* #6052

@Benjamin-Lee

Description

@Benjamin-Lee

Which project does this relate to?

Start

Describe the bug

Environment variables from .env.development aren't being loaded and merged with .env.

This might be related to #5217.

Your Example Website or App

https://github.com/Benjamin-Lee/tanstack-start-env

Steps to Reproduce the Bug or Issue

  1. Clone the repo and install dependencies
  2. Run npm run dev or bun run dev (don't run bun --bun run dev since that uses Bun's environment loader)
  3. Take a look at localhost:3000

Expected behavior

On localhost, we'd expect to see:

SECRET: foo
EXAMPLE: bar

Screenshots or Videos

Image

Platform

  • Router / Start Version: 1.140.0
  • OS: macOS
  • Browser: N/A
  • Browser Version: N/A
  • Bundler: vite
  • Bundler Version: 7.2.7

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions