From 1142175778cdc21add2d4b494a02c53050856aa5 Mon Sep 17 00:00:00 2001 From: Cyril Sobierajewicz Date: Mon, 3 Dec 2018 11:52:09 +0100 Subject: Allow previous loaders to further describe errors --- src/index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/index.js') diff --git a/src/index.js b/src/index.js index 0b4ecf8..01ad5a6 100644 --- a/src/index.js +++ b/src/index.js @@ -225,12 +225,14 @@ module.exports = function purescriptLoader(source, map) { filename: baseModulePath }; - if (typeof this.extractPursDependenciesFromError === 'function') { - const dependencies = this.extractPursDependenciesFromError(error) || []; + if (typeof this.describePscError === 'function') { + const { dependencies = [], details } = this.describePscError(error, desc); for (const dep of dependencies) { this.addDependency(dep); } + + Object.assign(desc, details); } modules.push(desc); -- cgit v1.2.3