dotenv-module
dotenv-module copied to clipboard
env vars are not defined in nuxt layer
Context
I'm trying to make a Nuxt layer, with a demo folder to extend the base/layer code.
So, to launch the project, yarn dev is equivalent to nuxt dev demo
Issue
Env vars from .env file seems to not be read. Console logs returns undefined on nuxt.config.ts of the layer.
If I launch the project without targeting the demo folder (nuxt dev), everything works.
https://stackblitz.com/edit/github-yzyan4?file=package.json,nuxt.config.ts