N
Nuxt4mo ago
matthew

nuxt dev doesn't load .env

The docs say:
In addition to any process environment variables, if you have a .env file in your project root directory, it will be automatically loaded at dev, build and generate time.
This appears to not be the case. I have an .env file in the project root directory. If I run nuxt dev, this file is not loaded onto process.env at runtime. 🤷‍♂️
2 Replies
less
less4mo ago
have you configure the .env in nuxt.config? or maybe you can run using nuxi dev --dotenv [dotenv file]
Wicker
Wicker4mo ago
Could you provide your nuxt config?

Did you find this page helpful?