Skip to content

Commit

Permalink
flip the if logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobbe committed Apr 6, 2024
1 parent ae7ca54 commit 14f4067
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions packages/framework-tools/src/buildDefaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,16 @@ export async function build({
...buildOptions,
})

if (!result.metafile) {
if (result.metafile) {
await fs.writeJSON(path.join(cwd, metafileName), result.metafile, {
spaces: 2,
})
} else {
console.warn(
'No metafile found in esbuild result\n\n' +
'No metafile found in esbuild result.\n\n' +
'This is unexpected and probably means something is wrong with the ' +
'build\n\n' +
'build.\n\n' +
'---\n\n',
)
} else {
await fs.writeJSON(path.join(cwd, metafileName), result.metafile, {
spaces: 2,
})
}
}

0 comments on commit 14f4067

Please sign in to comment.