Skip to content

Commit

Permalink
Allow single project configs to specify feature flags (#3840)
Browse files Browse the repository at this point in the history
Summary:
I'm hacking on a side project, and I wanted to try to get Relay Resolvers to work but I could not enable them using the single project config.

Pull Request resolved: #3840

Reviewed By: rbalicki2

Differential Revision: D34964872

Pulled By: captbaritone

fbshipit-source-id: df47f06b75e99daa0340e71b527b7df238bfa140
  • Loading branch information
captbaritone authored and facebook-github-bot committed Mar 17, 2022
1 parent eb0fc26 commit 58b335e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions compiler/crates/relay-compiler/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,9 @@ pub struct SingleProjectConfigFile {

/// Added in 13.1.1 to customize Final/Compat mode in the single project config file
pub typegen_phase: FlowTypegenPhase,

#[serde(default)]
pub feature_flags: Option<FeatureFlags>,
}

impl Default for SingleProjectConfigFile {
Expand All @@ -644,6 +647,7 @@ impl Default for SingleProjectConfigFile {
codegen_command: None,
js_module_format: JsModuleFormat::CommonJS,
typegen_phase: FlowTypegenPhase::Final,
feature_flags: None,
}
}
}
Expand Down Expand Up @@ -753,6 +757,7 @@ impl SingleProjectConfigFile {
..Default::default()
},
js_module_format: self.js_module_format,
feature_flags: self.feature_flags,
..Default::default()
};

Expand Down

0 comments on commit 58b335e

Please sign in to comment.