From 2835cb32e50f5a65e9e00f9b67c06417750e89aa Mon Sep 17 00:00:00 2001 From: Thenglong Heng Date: Mon, 21 Aug 2023 22:33:43 +0700 Subject: [PATCH] fix(js): fix swc opens swc.js instead of compiling on windows (#18723) (cherry picked from commit 078cf9a1cad7d8ecef54491b4d9b99e63ad713ab) --- packages/js/src/utils/swc/compile-swc.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/js/src/utils/swc/compile-swc.ts b/packages/js/src/utils/swc/compile-swc.ts index 91315fd0b4d82..ede82806fe9b5 100644 --- a/packages/js/src/utils/swc/compile-swc.ts +++ b/packages/js/src/utils/swc/compile-swc.ts @@ -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