Home > front end >  Request the great spirit of NPM install doubts
Request the great spirit of NPM install doubts

Time:12-29

For example, I NPM install axios,
This way will not not modify package. Json,
But if I were in the server,
Use NPM install - production,
No we won't be able to download a axios,
The introduction of the file inside I use axios package will be an error?

CodePudding user response:

1, NPM install... - save
2, NPM install... - save - dev
This will write into the package. The json, one is write dependencies, one is written to devDependencies

CodePudding user response:

Such as I vue - cli initialize a project, it introduces axios, but axios is NPM I axios installed modules, if I am to the server to NPM I - production, and this axios module will download down

CodePudding user response:

Test figured it out, NPM module name, I will now download the module information will directly put into production depend on the dependencies
  • Related