Adding npm scripts

In this lesson, we will finally get to run our project after implementing a couple of npm scripts.

Adding the scripts

We are going to leverage npm scripts to start our app in development mode and build a production version of our app. Let’s add a scripts section to package.json with the following scripts:

  ...,
  "scripts": {
    "start": "webpack serve --open --mode development",
    "build": "webpack --mode production"
  },
  ...

Get hands-on with 1400+ tech skills courses.