What is the difference between npm run and running commands directly?

The npm run command will temporarily add node_modules/.bin in the current directory to the PATH.
That is to say, the code in js can directly use the package name installed in node_modules without the path.
Example

 import 'vue'

In this case, use the command directly, skip npm run, you may not find the package

Guess you like

Origin blog.csdn.net/qq_41636947/article/details/114993155