This package contains the logic to run webpack-dev-server to serve your webpack app and provide live reloading.
npm i -D webpack-cli @webpack-cli/serve
To run the scaffolding instance programmatically, install it as a dependency. When using the package programmatically, one does not have to install webpack-cli.
const serve = require("@webpack-cli/serve").default;
serve();
npx webpack-cli serve