Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,19 @@ const typescript: PluginImpl<RPT2Options> = (options) =>
return transformResult;
},

buildEnd(err)
{
if (!err)
return

// workaround: err.stack contains err.message and Rollup prints both, causing duplication, so split out the stack itself if it exists (c.f. https://github.com/ezolenko/rollup-plugin-typescript2/issues/103#issuecomment-1172820658)
const stackOnly = err.stack?.split(err.message)[1];
if (stackOnly)
this.error({ ...err, message: err.message, stack: stackOnly });
else
this.error(err);
},

generateBundle(bundleOptions)
{
self._ongenerate();
Expand Down