Skip to content

Commit

Permalink
Run compatPrebuild in a separate output directory
Browse files Browse the repository at this point in the history
  • Loading branch information
simonihmig committed Dec 3, 2024
1 parent 35f48d4 commit eadabaa
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions packages/vite/src/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand Down

0 comments on commit eadabaa

Please sign in to comment.