Search⌘ K
AI Features

Step 5: Compile and Run the Application

Understand how to set up Webpack by configuring scripts in package.json to compile and run ES6 applications. Learn to execute and automate builds using the watch flag for seamless development. Gain practical skills to maintain your JavaScript code effectively with Webpack.

We'll cover the following...

As we installed webpack locally, we have to configure a script to execute it. In your package.json file, the following key was generated by default:

Node.js
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},

Replace the test script with a webpack script:

Node.js
"scripts": {
"webpack": "webpack"
},

Enter npm run ...