I\'m trying to add some environment variables into my vue app.
here is content of my .env
file, which is placed on root(outside src
):
When using Vue CLI 2, you have to use the dev.env.js and prod.env.js files located in the config folder.
Vue CLI 2 does not support the use of .env files, however Vue CLI 3 does.
// /config/prod.env.js
'use strict'
module.exports = {
NODE_ENV: '"production"',
SERVER_URI: "http://someremoteuri:3333/api/v1"
}
// /config/dev.env.js
'use strict'
module.exports = {
NODE_ENV: '"development"',
SERVER_URI: "http://localhost:3333/api/v1"
}