aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--README.md1
-rw-r--r--src/Psc.js7
-rw-r--r--src/index.js1
3 files changed, 8 insertions, 1 deletions
diff --git a/README.md b/README.md
index 3b31354..931e4e6 100644
--- a/README.md
+++ b/README.md
@@ -61,6 +61,7 @@ const loaderConfig = {
61 bundleNamespace: 'PS', 61 bundleNamespace: 'PS',
62 bundle: false, 62 bundle: false,
63 warnings: true, 63 warnings: true,
64 watch: false, // indicates if webapck is in watch mode
64 output: 'output', 65 output: 'output',
65 src: [ 66 src: [
66 path.join('src', '**', '*.purs'), 67 path.join('src', '**', '*.purs'),
diff --git a/src/Psc.js b/src/Psc.js
index 4991d5f..ffa32b7 100644
--- a/src/Psc.js
+++ b/src/Psc.js
@@ -45,7 +45,12 @@ function compile(psModule) {
45 if (errorMessage.length) { 45 if (errorMessage.length) {
46 psModule.emitError(errorMessage); 46 psModule.emitError(errorMessage);
47 } 47 }
48 reject(new Error('compilation failed')) 48 if (options.watch) {
49 resolve(psModule);
50 }
51 else {
52 reject(new Error('compilation failed'))
53 }
49 } else { 54 } else {
50 const warningMessage = stderr.join(''); 55 const warningMessage = stderr.join('');
51 if (options.warnings && warningMessage.length) { 56 if (options.warnings && warningMessage.length) {
diff --git a/src/index.js b/src/index.js
index 3f5e6a8..f4a6dff 100644
--- a/src/index.js
+++ b/src/index.js
@@ -46,6 +46,7 @@ module.exports = function purescriptLoader(source, map) {
46 bundleNamespace: 'PS', 46 bundleNamespace: 'PS',
47 bundle: false, 47 bundle: false,
48 warnings: true, 48 warnings: true,
49 watch: false,
49 output: 'output', 50 output: 'output',
50 src: [ 51 src: [
51 path.join('src', '**', '*.purs'), 52 path.join('src', '**', '*.purs'),