We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0d9aa9a commit 941da90Copy full SHA for 941da90
packages/serve/index.ts
@@ -46,6 +46,15 @@ const pmConfig: PackageManagerConfig = {
46
};
47
48
const spawnWithArg = (pm: string, cmd: string): SpawnSyncReturns<Buffer> => {
49
+ /*
50
+ * The dependency installation commands for the
51
+ * respective package manager is available as
52
+ * nested objects within pmConfig
53
+ *
54
+ * We gonna extract the root installation command
55
+ * and rest of the flags from pmConfig object
56
+ * by means of array destructuring
57
+ */
58
const [installCmd, ...flags] = pmConfig[pm][cmd];
59
const options: string[] = [installCmd, "webpack-dev-server", ...flags];
60
return spawn.sync(pm, options, { stdio: "inherit" });
0 commit comments