-
The following scripts are commonly used in
Vite
. -
They can be executed using the
npm run
oryarn
command followed by the script name. -
For example, to start the development server, you can run
npm run dev
oryarn dev
.-
dev
: Starts the development server and serves the project locally. It automatically reloads the browser when changes are made to the code. -
build
: Builds the project for production. It generates optimized and minified files ready for deployment. -
serve
: Serves the built project locally. This is useful for testing the production build before deployment. -
test
: Runs the project's test suite. This script is typically used with a testing framework like Jest or Mocha. -
lint
: Runs the linter to check for code style and formatting issues. This script is often used with ESLint or Prettier. -
format
: Formats the code according to the project's style guide. This script is useful for automatically fixing code formatting issues.
-