fix(js): fix swc opens swc.js instead of compiling on windows (#18723)

This commit is contained in:
Thenglong Heng 2023-08-21 22:33:43 +07:00 committed by GitHub
parent a668c665a7
commit 078cf9a1ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,7 +11,7 @@ function getSwcCmd(
watch = false
) {
const swcCLI = require.resolve('@swc/cli/bin/swc.js');
let swcCmd = `${swcCLI} ${
let swcCmd = `node ${swcCLI} ${
// TODO(jack): clean this up when we remove inline module support
// Handle root project
srcPath === '.' ? 'src' : srcPath