Skip to content

Commit

Permalink
fix(bundling): show codeframes for Rollup build errors (nrwl#22845)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaysoo authored and AgentEnder committed Apr 23, 2024
1 parent 143712a commit fed1a9e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/rollup/src/executors/rollup/rollup.impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@ export async function* rollupExecutor(
logger.info(`⚡ Done in ${duration}`);
return { success: true, outfile };
} catch (e) {
if (e.formatted) {
// Formattted message is provided by Rollup and contains codeframes for where the error occurred.
logger.info(e.formatted);
}
logger.error(e);
logger.error(`Bundle failed: ${context.projectName}`);
return { success: false };
Expand Down

0 comments on commit fed1a9e

Please sign in to comment.