본문 바로가기

💻 개발IT/Vue.js

[Vue] process.env undefined 오류

vue에서 process.env의 변수가 undefined 되는 문제가 있었다.

 

확인해보니 변수명의 prefix가 있어

VUE_APP_*

로 변수명을 바꾸면 해결

 

https://cli.vuejs.org/guide/mode-and-env.html#using-env-variables-in-client-side-code

 

Modes and Environment Variables | Vue CLI

Modes and Environment Variables Modes Mode is an important concept in Vue CLI projects. By default, there are three modes: development is used by vue-cli-service servetest is used by vue-cli-service test:unitproduction is used by vue-cli-service build and

cli.vuejs.org

 

반응형