File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -35,14 +35,18 @@ module LoadScript = {
3535}
3636
3737module 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`
4044
4145 let getLibraryCmijUrl = (version , libraryName : string ): string =>
42- ` /playground-bundles /${Semver.toString(version)}/${libraryName}/cmij.js`
46+ ` ${baseUrl} /${Semver.toString(version)}/${libraryName}/cmij.js`
4347
4448 let getStdlibRuntimeUrl = (version , filename ) =>
45- ` /playground-bundles /${Semver.toString(version)}/compiler-builtins/stdlib/${filename}`
49+ ` ${baseUrl} /${Semver.toString(version)}/compiler-builtins/stdlib/${filename}`
4650}
4751
4852module FinalResult = {
You can’t perform that action at this time.
0 commit comments