diff --git a/src/dune_rules/jsoo/js_of_ocaml.ml b/src/dune_rules/jsoo/js_of_ocaml.ml index c8f74dd59dd..8ce2b5946f8 100644 --- a/src/dune_rules/jsoo/js_of_ocaml.ml +++ b/src/dune_rules/jsoo/js_of_ocaml.ml @@ -201,9 +201,10 @@ module In_buildable = struct fields (let+ flags = Flags.decode and+ enabled_if = - field_o - "enabled_if" - (Dune_lang.Syntax.since Stanza.syntax (3, 17) >>> Blang.decode) + only_in_executable + (field_o + "enabled_if" + (Dune_lang.Syntax.since Stanza.syntax (3, 17) >>> Blang.decode)) and+ javascript_files = field "javascript_files" (repeat string) ~default:[] and+ wasm_files = match (mode : Mode.t) with