- Published on
What is `-D` in npm install commands?
- Authors
- Name
- hwahyeon
-D
is an abbreviation for --save-dev
in the npm install command, which adds a package to the devDependencies section. Tools like ts-node
are usually only needed during development and not in production, so they’re typically installed as devDependencies
.
npm install -D ts-node
Using this command adds ts-node
to the devDependencies
section in package.json
.