1
1
module ModuleNameMap = Map. Make (ModuleName )
2
2
3
- type module_ = CommonJS | ES6
3
+ type module_ = CommonJS | ESModule
4
4
5
5
(* * Compatibility for `compilerOptions.moduleResolution` in TypeScript projects. *)
6
6
type moduleResolution =
@@ -41,7 +41,7 @@ let default =
41
41
everything = false ;
42
42
exportInterfaces = false ;
43
43
generatedFileExtension = None ;
44
- module_ = ES6 ;
44
+ module_ = ESModule ;
45
45
moduleResolution = Node ;
46
46
namespace = None ;
47
47
platformLib = " " ;
@@ -53,7 +53,7 @@ let default =
53
53
54
54
let bsPlatformLib ~config =
55
55
match config.module_ with
56
- | ES6 -> config.platformLib ^ " /lib/es6"
56
+ | ESModule -> config.platformLib ^ " /lib/es6"
57
57
| CommonJS -> config.platformLib ^ " /lib/js"
58
58
59
59
let getBsCurryPath ~config = Filename. concat (bsPlatformLib ~config ) " curry.js"
@@ -154,9 +154,9 @@ let readConfig ~getConfigFile ~namespace =
154
154
(* Give priority to gentypeconfig, followed by package-specs *)
155
155
match (moduleString, packageSpecsModuleString) with
156
156
| Some "commonjs" , _ -> CommonJS
157
- | Some " es6" , _ -> ES6
157
+ | Some ( "esmodule" | " es6") , _ -> ESModule
158
158
| None , Some "commonjs" -> CommonJS
159
- | None , Some ("es6" | "es6-global" ) -> ES6
159
+ | None , Some ("esmodule" | " es6" | "es6-global" ) -> ESModule
160
160
| _ -> default.module_
161
161
in
162
162
let moduleResolution =
0 commit comments