Skip to content

Commit

Permalink
Merge pull request #1148 from forcedotcom/mz/bundle-test-cover
Browse files Browse the repository at this point in the history
  • Loading branch information
WillieRuemmele authored Oct 4, 2024
2 parents 1c92ea7 + 8bbfce4 commit 36fa22d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/bundleWithCheck.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ const commandToRun = 'yarn build && node ./scripts/build.js';
exec(commandToRun, (error, stdout, stderr) => {
// Combine stdout and stderr to check the entire output
const output = `${stdout}\n${stderr}`;
if (error) {
console.error(output);
process.exit(1); // Exit with an error code
}
// Check if the output contains the error string of esbuild
if (output.includes('[require-resolve-not-external]')) {
console.error('Error: A dependency that has to be externalized in esbuild process is found. Please resolve it!');
Expand Down

0 comments on commit 36fa22d

Please sign in to comment.