Skip to content
This repository was archived by the owner on Apr 24, 2021. It is now read-only.

Commit 9afaa56

Browse files
committed
Support for upcoming rescript npm package for the compiler.
Look for `rescript` in addition to `bs-platform` in `node_modules`.
1 parent 7048bc0 commit 9afaa56

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

Changes.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
## master
22
- Add support for @deprecated attributes in autocomplete and hover.
3+
- Support for upcoming `rescript` npm package for the compiler. Look for `rescript` in addition to `bs-platform` in `node_modules`.
34

45
## Upcoming Release of rescript-vscode
56

src/rescript-editor-support/BuildSystem.re

+9
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,15 @@ let getBsPlatformDir = rootPath => {
1212
~startPath=rootPath,
1313
"bs-platform",
1414
);
15+
let result =
16+
if (result == None) {
17+
ModuleResolution.resolveNodeModulePath(
18+
~startPath=rootPath,
19+
"rescript",
20+
);
21+
} else {
22+
result;
23+
};
1524
switch (result) {
1625
| Some(path) => Ok(path)
1726
| None =>

0 commit comments

Comments
 (0)