Rad Blog

Archive

npm --save와 --save-dev를 사용하는 이유, 뒤에 --production을 사용하는 이유

2022-02-01 web xfrnk2
npm install (plugin) –save란? 패키지(plugin)를 ./node_moduels 디렉터리에 설치하고 ./package.json 파일의 dependencies 항목에 플러그인 정보가 저장 된다. –production 빌드시 해당 플러그인이 포함된다. npm install (plugin) –save-dev란? 패키지(plugin)를 ./node_moduels 디렉터리에 설치하고 ./package.json 파일의 devDependencies 항목에 플러그인 정보가 저장 된다. --production 빌드시 해당 플러그인이 포함되지 않는다. 한 가지 더 다른 점은, devDependencies 의 경우 dependencies 와 다르게 --production으로 빌드 시 해당 플러그인이 포함되지 않는다. --save-dev 의 뒤에 있는 dev라는 단어가 아마 development mode 혹은 development purpose 등을 의미하는 것으로 추정된다. Continue reading