aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/utils.js
diff options
context:
space:
mode:
authorCyril Sobierajewicz <cyril.sobierajewicz@fretlink.com>2019-03-18 12:02:35 +0100
committerCyril Sobierajewicz <cyril.sobierajewicz@fretlink.com>2019-03-18 13:46:27 +0100
commitc69d78d9010e224f1a31b1acfa24db346d535cb6 (patch)
treefc60163dfb0be013ccfcda40a0cac51a60c2f7aa /src/utils.js
parent8a5fcc4d12c8526871d82cb5ea5760a32d1ae813 (diff)
downloadpurs-loader-c69d78d9010e224f1a31b1acfa24db346d535cb6.tar.gz
purs-loader-c69d78d9010e224f1a31b1acfa24db346d535cb6.tar.zst
purs-loader-c69d78d9010e224f1a31b1acfa24db346d535cb6.zip
Watch foreign modules on compilation error
Diffstat (limited to 'src/utils.js')
-rw-r--r--src/utils.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/utils.js b/src/utils.js
index b6ccf81..829ba72 100644
--- a/src/utils.js
+++ b/src/utils.js
@@ -33,3 +33,7 @@ exports.resolvePursModule = ({ baseModulePath, baseModuleName, targetModuleName
33 `${path.join(...parts)}.purs`) 33 `${path.join(...parts)}.purs`)
34 : baseModulePath; 34 : baseModulePath;
35}; 35};
36
37exports.resolveForeignModule = pursModulePath =>
38 path.join(path.dirname(pursModulePath),
39 path.basename(pursModulePath, path.extname(pursModulePath)) + '.js');