@@ -152,8 +152,10 @@ let parseFiles projectFileName options =
152152 // Fable (F# to JS)
153153 let projDir = projectFileName |> normalizeFullPath |> Path.GetDirectoryName
154154 let libDir = options.libDir |> Option.defaultValue ( getFableLibDir()) |> normalizeFullPath
155+
155156 let parseFable ( res , fileName ) =
156157 fable.CompileToBabelAst( libDir, res, fileName,
158+ eraseTypes = options.eraseTypes,
157159 typedArrays = options.typedArrays,
158160 typescript = options.typescript)
159161
@@ -164,9 +166,9 @@ let parseFiles projectFileName options =
164166
165167 let getOrAddDeduplicateTargetDir =
166168 let dedupDic = System.Collections.Generic.Dictionary()
167- fun ( importDir : string ) addTargetDir ->
169+ fun importDir addTargetDir ->
168170 // Lower importDir as some OS use case insensitive paths
169- let importDir = JS.path.resolve ( importDir) .ToLower()
171+ let importDir = ( normalizeFullPath importDir) .ToLower()
170172 match dedupDic.TryGetValue( importDir) with
171173 | true , v -> v
172174 | false , _ ->
@@ -238,6 +240,7 @@ let run opts projectFileName outDir =
238240 benchmark = opts |> hasFlag " --benchmark"
239241 optimize = opts |> hasFlag " --optimize"
240242 // sourceMaps = opts |> hasFlag "--sourceMaps"
243+ eraseTypes = opts |> hasFlag " --eraseTypes"
241244 typedArrays = opts |> tryFlag " --typedArrays"
242245 |> Option.defaultValue ( opts |> hasFlag " --typescript" |> not )
243246 typescript = opts |> hasFlag " --typescript"
0 commit comments