Skip to content

Commit a16e51f

Browse files
committed
Omit standard library dir from load path if -nostdlib is set
1 parent 171e03a commit a16e51f

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
1313
# 11.1.3-rc.1
1414

15+
#### :bug: Bug Fix
16+
17+
- Omit standard library dir from load path if -nostdlib is set. https://github.com/rescript-lang/rescript-compiler/pull/6833
18+
1519
# 11.1.2
1620

1721
#### :bug: Bug Fix

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)