Skip to content

Commit dccbb1e

Browse files
Playground: Don't load external @rescript/core package for ReScript 12
1 parent 52ac336 commit dccbb1e

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

src/common/CompilerManagerHook.res

+10-4
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,17 @@ let getLibrariesForVersion = (~version: Semver.t): array<string> => {
134134
[]
135135
}
136136

137-
// Since version 11, we ship the compiler-builtins as a separate file, and
138-
// we also added @rescript/core as a pre-vendored package
137+
// Since version 11, we ship the compiler-builtins as a separate file
139138
if version.major >= 11 {
140-
libraries->Array.push("@rescript/core")->ignore
141-
libraries->Array.push("compiler-builtins")->ignore
139+
libraries->Array.push("compiler-builtins")
140+
}
141+
142+
// From version 11 to 12.0.0-alpha.3 @rescript/core is an external package
143+
switch version {
144+
| {major: 11}
145+
| {major: 12, minor: 0, patch: 0, preRelease: Some(Alpha(1 | 2 | 3))} =>
146+
libraries->Array.push("@rescript/core")
147+
| _ => ()
142148
}
143149

144150
libraries

0 commit comments

Comments
 (0)