Categories
JavaScript Answers

How to fix webpack command not working with JavaScript?

Spread the love

To fix webpack command not working with JavaScript, we add the webpack command to a script.

For instance, we write

{
  "scripts": {
    "build": "webpack --config webpack.config.js"
  }
}

in package.json to add the build script.

We set it to run the webpack command with the webpack.config.js config.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *