MCPcopy Index your code
hub / github.com/webpack/webpack-dev-server / runCli

Function runCli

bin/webpack-dev-server.js:60–72  ·  view source on GitHub ↗
(cli)

Source from the content-addressed store, hash-verified

58 * @returns {Promise<void>}
59 */
60const runCli = async (cli) => {
61 if (cli.preprocess) {
62 cli.preprocess();
63 }
64
65 const pkgUrl = import.meta.resolve(`${cli.package}/package.json`);
66 const pkgPath = fileURLToPath(pkgUrl);
67 const pkg = (await import(pkgUrl, { with: { type: "json" } })).default;
68
69 const binPath = path.resolve(path.dirname(pkgPath), pkg.bin[cli.binName]);
70
71 await import(pathToFileURL(binPath).href);
72};
73
74/**
75 * @typedef {object} CliOption

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…