File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,9 @@ module Process = {
1616 @scope ("process" ) external env : Dict .t <string > = "env"
1717 @scope ("process" ) @val external argv : array <string > = "argv"
1818 @scope ("process" ) external exit : int => unit = "exit"
19+ module Env = {
20+ @scope (("process" , "env" )) external nodeEnv : string = "NODE_ENV"
21+ }
1922}
2023
2124module Fs = {
Original file line number Diff line number Diff line change @@ -35,7 +35,10 @@ module LoadScript = {
3535}
3636
3737module CdnMeta = {
38- let baseUrl = "/playground-bundles"
38+ let baseUrl =
39+ Node .Process .Env .nodeEnv === "development"
40+ ? "https://cdn.rescript-lang.org"
41+ : "" + "/playground-bundles"
3942
4043 let getCompilerUrl = (version ): string => ` ${baseUrl}/${Semver.toString(version)}/compiler.js`
4144
You can’t perform that action at this time.
0 commit comments