Skip to content
Closed
Changes from 1 commit
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
Next Next commit
fix: friendly description of vague error
After all these years we have an opportunity to enjoy
a human-friendly error description...
  • Loading branch information
hinell committed Mar 15, 2019
commit 51ad4bb9f1470aa03ce64f709e0eff03e1692c7a
8 changes: 7 additions & 1 deletion src/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,13 @@ export function pitch(request) {
};
});
}
this[MODULE_TYPE](text);
try {
this[MODULE_TYPE](text);
} catch (error) {
const pluginIsNotFound = `Invalid webpack configuration: plugin ${pluginName} is not found.
It's highly likely that you forgot to add css extraction plugin into your webpack configuration(s)`;
throw new Error(pluginIsNotFound);
}
} catch (e) {
return callback(e);
}
Expand Down