Skip to content

[Bug Report]: build mode the .env.production Not effective #2183

@deyihu

Description

@deyihu

Steps to reproduce

doc url: https://www.farmfe.org/zh/docs/features/env

//.env.development
FARM_TITLE=HELLO

//.env.production
FARM_TITLE='HELLO WORLD'
console.log(process.env.NODE_ENV);
//out is production
console.log(process.env.FARM_TITLE);
//out is HELLO

When in build mode, environment variables remain in the development environment

Reproduce link

No response

What is actually happening?

build mode use .env.production file

System Info

windows

chrome

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions