From eadabaad1c534abde25831499b07454621d2a1c7 Mon Sep 17 00:00:00 2001 From: Simon Ihmig Date: Tue, 3 Dec 2024 10:02:20 +0100 Subject: [PATCH] Run compatPrebuild in a separate output directory --- packages/vite/src/build.ts | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/packages/vite/src/build.ts b/packages/vite/src/build.ts index c17fafc1a..5fd673992 100644 --- a/packages/vite/src/build.ts +++ b/packages/vite/src/build.ts @@ -13,15 +13,23 @@ export function emberBuild(command: string, mode: string, resolvableExtensions: if (command === 'build') { return new Promise((resolve, reject) => { - const child = fork('./node_modules/ember-cli/bin/ember', ['build', '--environment', mode], { env }); + const child = fork( + './node_modules/ember-cli/bin/ember', + ['build', '--environment', mode, '-o', 'tmp/compat-prebuild', '--suppress-sizes'], + { env } + ); child.on('exit', code => (code === 0 ? resolve() : reject())); }); } return new Promise((resolve, reject) => { - const child = fork('./node_modules/ember-cli/bin/ember', ['build', '--watch', '--environment', mode], { - silent: true, - env, - }); + const child = fork( + './node_modules/ember-cli/bin/ember', + ['build', '--watch', '--environment', mode, '-o', 'tmp/compat-prebuild', '--suppress-sizes'], + { + silent: true, + env, + } + ); child.on('exit', code => (code === 0 ? resolve() : reject(new Error('ember build --watch failed')))); child.on('spawn', () => { child.stderr?.on('data', data => {