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
vue-cli-service build 커맨드로 build를 수행할 경우, NODE_ENV를 컨트롤 하면 안 된다. vue-cli-service 내부적으로 NODE_ENV를 판단하여 build mode를 지정하고 있다.
vue-cli-service build
NODE_ENV
$ NODE_ENV=beta vue-cli-service --mode development # development build $ NODE_ENV=real vue-cli-service --mode production # production build
이렇게 하면 죽어라 빌드를 돌려도 프로덕션 빌드가 이루어지지 않음. 아래와 같이 해야 함.
$ vue-cli-service --mode development # development build $ vue-cli-service --mode production # production build
다른 phase로 build를 해야하는데 production build로 해야할 경우, 별도 argument를 넘겨줘서 내부적으로 env를 custom하는 방식을 사용한다. 예를 들면 다음과 같이.
"scripts": { "build-dev": "vue-cli-service --mode development", "build-prod": "vue-cli-service --mode production", "build:beta": "npm run build-prod -- --phase=beta", "build:real": "npm run build-prod -- --phase=real" }
NODE_END
mode
phase
VUE_ENV
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
vue-cli-service build
커맨드로 build를 수행할 경우,NODE_ENV
를 컨트롤 하면 안 된다.vue-cli-service 내부적으로
NODE_ENV
를 판단하여 build mode를 지정하고 있다.이렇게 하면 죽어라 빌드를 돌려도 프로덕션 빌드가 이루어지지 않음. 아래와 같이 해야 함.
다른 phase로 build를 해야하는데 production build로 해야할 경우, 별도 argument를 넘겨줘서 내부적으로 env를 custom하는 방식을 사용한다. 예를 들면 다음과 같이.
Conclusion
NODE_END
로 pahse를 컨트롤하지 않는다.mode
와phase
를 구분한다.VUE_ENV
를 사용해본다. (뭔진 모름)The text was updated successfully, but these errors were encountered: