Skip to content

Commit

Permalink
Merge pull request #792 from linxiaowu66/master
Browse files Browse the repository at this point in the history
fix(loader): new Error to webpack when errors occured in the loader f…
  • Loading branch information
johnnyreilly committed Jun 27, 2018
2 parents fb7eb9d + fa10935 commit 3c26aea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function loader(this: Webpack, contents: string) {
const instanceOrError = getTypeScriptInstance(options, this);

if (instanceOrError.error !== undefined) {
callback(instanceOrError.error);
callback(new Error(instanceOrError.error.message));
return;
}

Expand Down

0 comments on commit 3c26aea

Please sign in to comment.