I'm building an app using Vue CLI 3.
I've included .env
in my project and everything works fine.
But when i'm building the app for production via npm run build
there is no .env
file in my dist
folder, so i can't change my environmental variables in production server.
Any solution or it's just fine?
This is supposed to happen. The env variables are embedded in your build.
You can make seperate .env files for production. These variables will be used during the production build.
Create a new .env file named: .env.production