fix: add cross-spawn (#341)

This commit is contained in:
Sebastian Rindom
2021-08-17 13:18:25 +02:00
committed by GitHub
parent 690718602c
commit 8f60f430cc
3 changed files with 13 additions and 11 deletions
+3 -2
View File
@@ -1,5 +1,6 @@
import path from "path"
import { spawn, execSync } from "child_process"
import { execSync } from "child_process"
import spawn from "cross-spawn"
import chokidar from "chokidar"
import Logger from "../loaders/logger"
@@ -28,7 +29,7 @@ export default async function({ port, directory }) {
Logger.info(`${f} changed: restarting...`)
child.kill("SIGINT")
execSync(`./node_modules/.bin/babel src -d dist`, {
execSync(`${babelPath} src -d dist`, {
cwd: directory,
stdio: ["pipe", process.stdout, process.stderr],
})