aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/index.js
diff options
context:
space:
mode:
authoreric <thul.eric@gmail.com>2016-11-19 14:09:12 -0500
committerGitHub <noreply@github.com>2016-11-19 14:09:12 -0500
commit0aa15fbd45950e3f7b43738049b25d1d3e9abc69 (patch)
tree108c0b3403f6b4ff2afbc85eca8532f305c94f77 /src/index.js
parent2d52ea7e4b77a3ea5a8574ca245f51738d22d4a0 (diff)
parent45c62a2c766132a13c546b19025e9c1ef25bcd5b (diff)
downloadpurs-loader-0aa15fbd45950e3f7b43738049b25d1d3e9abc69.tar.gz
purs-loader-0aa15fbd45950e3f7b43738049b25d1d3e9abc69.tar.zst
purs-loader-0aa15fbd45950e3f7b43738049b25d1d3e9abc69.zip
Merge pull request #77 from ethul/topic/psc-ide
Topic/psc ide
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)