Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions jscomp/core/js_dump_program.ml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ let dump_program (x : J.program) oc =


let node_program ~output_dir f ( x : J.deps_program) =
P.string f L.strict_directive;
P.newline f ;
let cxt =
Js_dump_import_export.requires
L.require
Expand All @@ -78,6 +80,8 @@ let node_program ~output_dir f ( x : J.deps_program) =

let amd_program ~output_dir kind f ( x : J.deps_program) =
let cxt = Ext_pp_scope.empty in
P.string f L.strict_directive;
P.newline f ;
P.vgroup f 1 @@ fun _ ->
P.string f L.define;
P.string f "([";
Expand Down Expand Up @@ -156,9 +160,7 @@ let pp_deps_program
P.string f empty_explanation
(* This is empty module, it won't be referred anywhere *)
else
let output_dir = Filename.dirname output_prefix in
P.string f L.strict_directive;
P.newline f ;
let output_dir = Filename.dirname output_prefix in
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am unclear how does this achieve the desired behavior?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of outputting it on all files it's just amd and commonjs

begin
ignore (match kind with
| Es6 | Es6_global ->
Expand Down