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 create
To generate default configs
npx webpack-cli create --auto
Via custom scaffold
- Using package on
npm
npx webpack-cli create webpack-scaffold-[name]
- Using path to a local directory
npx webpack-cli create [path]