File tree 1 file changed +8
-4
lines changed
1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -35,14 +35,18 @@ module LoadScript = {
35
35
}
36
36
37
37
module CdnMeta = {
38
- let getCompilerUrl = (version ): string =>
39
- ` /playground-bundles/${Semver.toString(version)}/compiler.js`
38
+ let baseUrl =
39
+ Node .Process .env -> Dict .getUnsafe ("VERCEL" ) === "1"
40
+ ? "https://cdn.rescript-lang.org"
41
+ : "/playground-bundles"
42
+
43
+ let getCompilerUrl = (version ): string => ` ${baseUrl}/${Semver.toString(version)}/compiler.js`
40
44
41
45
let getLibraryCmijUrl = (version , libraryName : string ): string =>
42
- ` /playground-bundles /${Semver.toString(version)}/${libraryName}/cmij.js`
46
+ ` ${baseUrl} /${Semver.toString(version)}/${libraryName}/cmij.js`
43
47
44
48
let getStdlibRuntimeUrl = (version , filename ) =>
45
- ` /playground-bundles /${Semver.toString(version)}/compiler-builtins/stdlib/${filename}`
49
+ ` ${baseUrl} /${Semver.toString(version)}/compiler-builtins/stdlib/${filename}`
46
50
}
47
51
48
52
module FinalResult = {
You can’t perform that action at this time.
0 commit comments