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 = {
16
16
@scope ("process" ) external env : Dict .t <string > = "env"
17
17
@scope ("process" ) @val external argv : array <string > = "argv"
18
18
@scope ("process" ) external exit : int => unit = "exit"
19
+ module Env = {
20
+ @scope (("process" , "env" )) external nodeEnv : string = "NODE_ENV"
21
+ }
19
22
}
20
23
21
24
module Fs = {
Original file line number Diff line number Diff line change @@ -35,7 +35,10 @@ module LoadScript = {
35
35
}
36
36
37
37
module CdnMeta = {
38
- let baseUrl = "/playground-bundles"
38
+ let baseUrl =
39
+ Node .Process .Env .nodeEnv === "development"
40
+ ? "https://cdn.rescript-lang.org"
41
+ : "" + "/playground-bundles"
39
42
40
43
let getCompilerUrl = (version ): string => ` ${baseUrl}/${Semver.toString(version)}/compiler.js`
41
44
You can’t perform that action at this time.
0 commit comments