1

In package.json, it is possible to define a script like

"scripts": 
{
  "build": "webpack"
}

which can be invoked through

npm run build

I am using a webpack.config.js which can process parameters. So my pure webpack command works like this:

webpack --env.path="path"

How can I pass this parameter when I want to invoke webpack via the npm build script? I.e. Is it possible to pass parameters to package.json scripts?

Oblomov
  • 8,953
  • 22
  • 60
  • 106

0 Answers0