Skip to content

Commit 904423d

Browse files
committed
Omit standard library dir from load path if -nostdlib is set
1 parent 95df049 commit 904423d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

jscomp/core/res_compmisc.ml

+3-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ let init_path () =
2727
let exp_dirs =
2828
List.map (Misc.expand_directory Config.standard_library) dirs
2929
in
30-
Config.load_path := List.rev_append exp_dirs [Config.standard_library];
30+
Config.load_path :=
31+
if !Js_config.no_stdlib then exp_dirs
32+
else (List.rev_append exp_dirs [Config.standard_library]);
3133
Env.reset_cache ()
3234

3335
(* Return the initial environment in which compilation proceeds. *)

0 commit comments

Comments
 (0)