Skip to content

Commit

Permalink
Playground: Don't load external @rescript/core package for ReScript 12 (
Browse files Browse the repository at this point in the history
  • Loading branch information
fhammerschmidt authored Oct 23, 2024
1 parent 52ac336 commit 4674de9
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/common/CompilerManagerHook.res
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,17 @@ let getLibrariesForVersion = (~version: Semver.t): array<string> => {
[]
}

// Since version 11, we ship the compiler-builtins as a separate file, and
// we also added @rescript/core as a pre-vendored package
// Since version 11, we ship the compiler-builtins as a separate file
if version.major >= 11 {
libraries->Array.push("@rescript/core")->ignore
libraries->Array.push("compiler-builtins")->ignore
libraries->Array.push("compiler-builtins")
}

// From version 11 to 12.0.0-alpha.3 @rescript/core is an external package
switch version {
| {major: 11}
| {major: 12, minor: 0, patch: 0, preRelease: Some(Alpha(1 | 2 | 3))} =>
libraries->Array.push("@rescript/core")
| _ => ()
}

libraries
Expand Down

0 comments on commit 4674de9

Please sign in to comment.