We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello.
.env.dev file is not working in nuxt plugin.
i created .env.dev file and run script "nuxt --dotenv .env.dev". print env variable in my custom nuxt plugin. console.log(process.env) #output :: {}
console.log(process.env) #output :: {}
But .env file is working.
The text was updated successfully, but these errors were encountered:
not working with nuxt3
nuxt.config.js is as follows
import { defineNuxtConfig } from "nuxt/config" export default defineNuxtConfig({ css : ['vuetify/lib/styles/main.sass', '@mdi/font/css/materialdesignicons.min.css'], modules: [ ['@nuxtjs/dotenv', { filename: '.env.development' }] ], runtimeConfig: { apiSecret: '123', public: { SITE_NAME: process.env.SITE_NAME || 'Ghost' } }, build : { transpile :[ 'vuetify', ] }, vite : { define : { 'process.env.DEBUG' : false, } } })
.env.development file present in source directory but it give error as follows
ERROR Cannot start nuxt: Cannot read properties of undefined (reading 'srcDir')
Sorry, something went wrong.
No branches or pull requests
Hello.
.env.dev file is not working in nuxt plugin.
i created .env.dev file and run script "nuxt --dotenv .env.dev".
print env variable in my custom nuxt plugin.
console.log(process.env) #output :: {}
But .env file is working.
The text was updated successfully, but these errors were encountered: