aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authoreric <thul.eric@gmail.com>2019-01-20 15:43:29 -0500
committerGitHub <noreply@github.com>2019-01-20 15:43:29 -0500
commit9020b66f758b0cf493e1c2df4680d34a7aa4f509 (patch)
tree2ec895917df9d2c55405e753d9cf36369fe201b0
parentcd1249993b209ad35b2d579b514aa74a2516cb16 (diff)
downloadpurs-loader-9020b66f758b0cf493e1c2df4680d34a7aa4f509.tar.gz
purs-loader-9020b66f758b0cf493e1c2df4680d34a7aa4f509.tar.zst
purs-loader-9020b66f758b0cf493e1c2df4680d34a7aa4f509.zip
Remove psModule references (#119)
Resolves #110
-rw-r--r--src/bundle.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/bundle.js b/src/bundle.js
index 99633f1..3742124 100644
--- a/src/bundle.js
+++ b/src/bundle.js
@@ -45,10 +45,11 @@ module.exports = function bundle(options, bundleModules) {
45 const errorMessage = stderr.join(''); 45 const errorMessage = stderr.join('');
46 46
47 if (errorMessage.length) { 47 if (errorMessage.length) {
48 psModule.emitError(errorMessage); 48 reject(new Error(`bundling failed: ${errorMessage}`))
49 }
50 else {
51 reject(new Error('bundling failed'))
49 } 52 }
50
51 reject(new Error('bundling failed'))
52 } 53 }
53 else { 54 else {
54 resolve(fs.appendFileAsync(options.bundleOutput, `module.exports = ${options.bundleNamespace}`)) 55 resolve(fs.appendFileAsync(options.bundleOutput, `module.exports = ${options.bundleNamespace}`))