This is probably a pretty basic question, but I can't find an answer:
If I have a project with a dependency in package.json
listed as foobar: ^3.2.1
, what version of that dependency will be installed when I run vite build
, assuming that the latest available version of the package is 3.4.5
?
CodePudding user response:
First thing first, vite build
won't change anything to your dependencies. I won't install ones nor update them. It will only build your project (i.e. compile / transpile / minify / bundle etc.) using your source code and the code it imports (likely within the node_modules).
It will build locally, so using your local dependencies in the node_modules
folder.
To check the current package version you have installed, you can run:
npm list --depth=0 | grep foobar
(The grep
part is optional)
You can also open your package-lock.json
or yarn.lock
file and search for your package to know to what version your package has been fixed to.
To understand about the semantic version with npm, read this documentation: https://docs.npmjs.com/about-semantic-versioning