1 | const WebpackCLI = require("./webpack-cli");
|
2 | const utils = require("./utils");
|
3 |
|
4 | const 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 |
|
18 | module.exports = runCLI;
|