2

I want to only have swagger in development environment but I want to disable this link or disable swagger when deploy on production. How can I do it?

haidn
  • 29
  • 5

1 Answers1

0

Check the NPM docs for install

"With the --production flag (or when the NODE_ENV environment variable is set to production), npm will not install modules listed in devDependencies."

"The --only={prod[uction]|dev[elopment]} argument will cause either only devDependencies or only non-devDependencies to be installed regardless of the NODE_ENV."

to install package for dev only :-

npm install swagger --only=dev
Ahmed farag mostafa
  • 2,802
  • 2
  • 14
  • 33