diff --git a/packages/cli/src/commands/buildHandler.js b/packages/cli/src/commands/buildHandler.js index dcb17dba2e86..a145031075bc 100644 --- a/packages/cli/src/commands/buildHandler.js +++ b/packages/cli/src/commands/buildHandler.js @@ -115,7 +115,9 @@ export const handler = async ({ // We don't have any parallel tasks right now, but someone might add // one in the future as a performance optimization. await execa( - `yarn rw-vite-build --webDir="${rwjsPaths.web.base}" --verbose=${verbose}`, + `node ${require.resolve( + '@redwoodjs/vite/bins/rw-vite-build.mjs' + )} --webDir="${rwjsPaths.web.base}" --verbose=${verbose}`, { stdio: verbose ? 'inherit' : 'pipe', shell: true, diff --git a/packages/vite/package.json b/packages/vite/package.json index 2cbad657d828..517fa007b28f 100644 --- a/packages/vite/package.json +++ b/packages/vite/package.json @@ -45,7 +45,8 @@ "./react-node-loader": { "types": "./dist/react-server-dom-webpack/node-loader.d.ts", "default": "./dist/react-server-dom-webpack/node-loader.js" - } + }, + "./bins/rw-vite-build.mjs": "./bins/rw-vite-build.mjs" }, "bin": { "rw-dev-fe": "./dist/devFeServer.js",