R
Join ServerRailway
✋|help
Issue with env vars using webpack
Hi there!
I'm trying to deploy a Vue2 project using vue-cli.
To access my env vars on client-side code i need to use
But on railway, everything returns
Its gets my
Tried using
What could it be? Webpack messing it up? On AWS worked fine.
I'm trying to deploy a Vue2 project using vue-cli.
To access my env vars on client-side code i need to use
process.env.VUE_APP_MYVAR
But on railway, everything returns
undefined
?Its gets my
process.env.NODE_ENV
var, but it doesnt get my other vars.Tried using
webpack-dotenv
to expose system vars too, but the rest of my vars still undefined.const Dotenv = require('dotenv-webpack');
new Dotenv({
systemvars: true
}),
What could it be? Webpack messing it up? On AWS worked fine.
de7aa210-2a7c-457e-9476-6c30744f4f10