This package contains the logic to create a new webpack configuration.
npm i -D webpack-cli @webpack-cli/init
To run the package programmatically, install it as a dependency. When using the package programmatically, one does not have to install webpack-cli.
const init = require("@webpack-cli/init").default;
// this will run the default init instance
init();
// we're slicing node.process, ...myPacakges is a webpack-scaffold name/path
init([null, null, ...myPacakges]);
Via defaults
npx webpack-cli init
Via custom scaffold
- Using package on
npm
npx webpack-cli init webpack-scaffold-[name]
- Using path to local directory
npx webpack-cli init [path]