UNPKG

443 BJavaScriptView Raw
1const WebpackCLI = require("./webpack-cli");
2const utils = require("./utils");
3
4const runCLI = async (args, originalModuleCompile) => {
5 try {
6 // Create a new instance of the CLI object
7 const cli = new WebpackCLI();
8
9 cli._originalModuleCompile = originalModuleCompile;
10
11 await cli.run(args);
12 } catch (error) {
13 utils.logger.error(error);
14 process.exit(2);
15 }
16};
17
18module.exports = runCLI;