Luyin / FE-Boilerplate

Typescript based Front-End Development Environment
0 stars 0 forks source link

Environment Variable #16

Closed Luyin closed 5 years ago

Luyin commented 5 years ago
Luyin commented 5 years ago

cross-env

Node의 환경 변수를 설정해 주는 크로스 플랫폼 유틸이다.

OS마다 환경변수 설정 방법이 다르다.

// Linux
process.env.NODE_ENV=production
// Windows
set NODE_ENV=production

// cross-env
cross-env NODE_ENV=production

자주 쓰는 환경 변수

NODE_ENV

NODE_ENV=production Build 모드를 지정하는 환경 변수

NODE_PATH

NODE_PATH=src 모듈 import의 base가 되는 경로 지정

Luyin commented 5 years ago

rimraf

Directory를 삭제 해주는 크로스 플랫폼 유틸이다.