Skip to content

Commit

Permalink
fix(loader): new Error to webpack when errors occured in the loader f…
Browse files Browse the repository at this point in the history
…unction
  • Loading branch information
linxiaowu66 authored and linxiaowu66 committed Jun 12, 2018
1 parent fb7eb9d commit fa10935
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 fa10935

Please sign in to comment.