npm Scripts and Plugins

Learn about npm scripts and plugins.

We'll cover the following

npm scripts

In the new project directory, there are several preconfigured npm scripts that we can use:

  • npm run serve: This will start a local development server and compile the project files. The process will watch the files in our src folder and recompile on any changes.

  • npm run build: This command will compile our project, creating an optimized production build.

  • npm run lint: This will run the linter on our project’s source files, checking them for compliance with the rule sets specified in the eslintConfig section of the project’s package.json file.

The generated package.json file is also worth a quick look.

Get hands-on with 1200+ tech skills courses.