use serde::Deserialize;
#[derive(Debug, Clone, Copy, PartialEq, Eq, Deserialize)]
#[serde(rename_all = "lowercase")]
pub(crate) enum RawTemplateSyntaxConfig {
Standard,
Strict,
Quirks,
}
impl RawTemplateSyntaxConfig {
pub(crate) fn as_str(self) -> &'static str {
match self {
Self::Standard => "standard",
Self::Strict => "strict",
Self::Quirks => "quirks",
}
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Default, Deserialize)]
#[serde(rename_all = "lowercase")]
pub enum JsxMode {
#[default]
Vdom,
Vapor,
}
impl JsxMode {
pub fn as_str(self) -> &'static str {
match self {
Self::Vdom => "vdom",
Self::Vapor => "vapor",
}
}
}
#[derive(Debug, Clone, Default, Deserialize)]
#[serde(default, rename_all = "camelCase")]
pub(crate) struct RawCompilerConfig {
pub(crate) template_syntax: Option<RawTemplateSyntaxConfig>,
pub(crate) jsx_mode: Option<JsxMode>,
}