Closed syhily closed 1 week ago
Hi @syhily can you please create a reproduction using https://astro.new/latest . Debugging your personal website slows down our ability to discover and fix the problem. Thank you.
Sorry for the inconvenience. I only add two line of code on astro.config.ts
and execute the astro build
. I'm sure this could reproduce this issue 100%.
console.log(process.env.NODE_ENV);
console.log(import.meta.env.MODE);
Hello @syhily. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with needs repro
will be closed if they have no activity within 3 days.
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
When I execute the
astro build
I found that theimport.meta.env.MODE
is always equal to thedevelopment
. Even if I set theNODE_ENV=production
.I just add a console.log in
astro.config.ts
and you can easily check the different in the bellowing screenshots.What's the expected result?
The
import.meta.env.MODE
should beproduction
when I execute theastro build
.Link to Minimal Reproducible Example
https://github.com/syhily/yufan.me
Participation