diff options
Diffstat (limited to 'src/bundle.js')
-rw-r--r-- | src/bundle.js | 7 |
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}`)) |