Add --dotenv .env.dev to the dev command in package.json > scripts.
For example: "dev": "nuxt dev --dotenv .env.dev"
Even if executed with bunx nuxt dev --dotenv .env.dev, the result is the same.
Write code that utilizes values from the .env.dev file, execute the dev command, and check the result.
Describe the bug
When running Nuxt with Bun, the --dotenv option does not work as specified.
If both .env.local and .env.dev files are created, it seems that the .env.local file is read with priority.
Environment
Reproduction
.env
files:.env.local
,.env.dev
,.env.prod
.--dotenv .env.dev
to the dev command inpackage.json
>scripts
. For example:"dev": "nuxt dev --dotenv .env.dev"
Even if executed withbunx nuxt dev --dotenv .env.dev
, the result is the same..env.dev
file, execute thedev
command, and check the result.Describe the bug
When running Nuxt with Bun, the
--dotenv
option does not work as specified. If both.env.local
and.env.dev
files are created, it seems that the.env.local
file is read with priority.Additional context
No response
Logs
No response