aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/index.js')
-rw-r--r--src/index.js17
1 files changed, 2 insertions, 15 deletions
diff --git a/src/index.js b/src/index.js
index f3b2fde..7c29650 100644
--- a/src/index.js
+++ b/src/index.js
@@ -62,21 +62,6 @@ module.exports = function purescriptLoader(source, map) {
62 psModuleMap: cache.psModuleMap 62 psModuleMap: cache.psModuleMap
63 } 63 }
64 }) 64 })
65
66 // add psc warnings to webpack compilation warnings
67 this._compiler.plugin('after-compile', (compilation, callback) => {
68 if (options.warnings && cache.warnings) {
69 compilation.warnings.unshift(`PureScript compilation:\n${cache.warnings}`)
70 cache.warnings = null;
71 }
72
73 if (cache.errors) {
74 compilation.errors.unshift(`PureScript compilation:\n${cache.errors}`)
75 cache.errors = null;
76 }
77
78 callback()
79 })
80 } 65 }
81 66
82 const psModuleName = PsModuleMap.match(source) 67 const psModuleName = PsModuleMap.match(source)
@@ -89,6 +74,8 @@ module.exports = function purescriptLoader(source, map) {
89 jsPath: path.resolve(path.join(options.output, psModuleName, 'index.js')), 74 jsPath: path.resolve(path.join(options.output, psModuleName, 'index.js')),
90 options: options, 75 options: options,
91 cache: cache, 76 cache: cache,
77 emitWarning: warning => this.emitWarning(warning),
78 emitError: error => this.emitError(error)
92 } 79 }
93 80
94 debug('loader called', psModule.name) 81 debug('loader called', psModule.name)