From 4696a8298be4e6ef928bd3bce937ee6d84aaa81d Mon Sep 17 00:00:00 2001 From: Dominic Saadi Date: Mon, 4 Dec 2023 15:22:32 -0800 Subject: [PATCH 1/2] fix(cli): avoid calling yarn internally in build --- packages/cli/src/commands/buildHandler.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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, From e8356aacf54e1d3e44ccdb727f42a333a5e78004 Mon Sep 17 00:00:00 2001 From: Dominic Saadi Date: Mon, 4 Dec 2023 21:16:11 -0800 Subject: [PATCH 2/2] export bin for `require.resolve` --- packages/vite/package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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",