Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ahabhgk committed May 14, 2024
1 parent 05be7d0 commit 37ea513
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions crates/node_binding/binding.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,7 @@ export interface RawCssAutoGeneratorOptions {
exportsConvention?: "as-is" | "camel-case" | "camel-case-only" | "dashes" | "dashes-only"
exportsOnly?: boolean
localIdentName?: string
esModule: boolean
esModule?: boolean
}

export interface RawCssAutoParserOptions {
Expand All @@ -793,14 +793,14 @@ export interface RawCssExtractPluginOption {
export interface RawCssGeneratorOptions {
exportsConvention?: "as-is" | "camel-case" | "camel-case-only" | "dashes" | "dashes-only"
exportsOnly?: boolean
esModule: boolean
esModule?: boolean
}

export interface RawCssModuleGeneratorOptions {
exportsConvention?: "as-is" | "camel-case" | "camel-case-only" | "dashes" | "dashes-only"
exportsOnly?: boolean
localIdentName?: string
esModule: boolean
esModule?: boolean
}

export interface RawCssModuleParserOptions {
Expand Down
6 changes: 3 additions & 3 deletions crates/rspack_binding_options/src/options/raw_module/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ pub struct RawCssGeneratorOptions {
#[napi(ts_type = r#""as-is" | "camel-case" | "camel-case-only" | "dashes" | "dashes-only""#)]
pub exports_convention: Option<String>,
pub exports_only: Option<bool>,
pub es_module: bool,
pub es_module: Option<bool>,
}

impl From<RawCssGeneratorOptions> for CssGeneratorOptions {
Expand All @@ -642,7 +642,7 @@ pub struct RawCssAutoGeneratorOptions {
pub exports_convention: Option<String>,
pub exports_only: Option<bool>,
pub local_ident_name: Option<String>,
pub es_module: bool,
pub es_module: Option<bool>,
}

impl From<RawCssAutoGeneratorOptions> for CssAutoGeneratorOptions {
Expand All @@ -663,7 +663,7 @@ pub struct RawCssModuleGeneratorOptions {
pub exports_convention: Option<String>,
pub exports_only: Option<bool>,
pub local_ident_name: Option<String>,
pub es_module: bool,
pub es_module: Option<bool>,
}

impl From<RawCssModuleGeneratorOptions> for CssModuleGeneratorOptions {
Expand Down
6 changes: 3 additions & 3 deletions crates/rspack_core/src/options/module.rs
Original file line number Diff line number Diff line change
Expand Up @@ -337,23 +337,23 @@ impl From<String> for DataUrlEncoding {
pub struct CssGeneratorOptions {
pub exports_convention: Option<CssExportsConvention>,
pub exports_only: Option<bool>,
pub es_module: bool,
pub es_module: Option<bool>,
}

#[derive(Debug, Clone, MergeFrom)]
pub struct CssAutoGeneratorOptions {
pub exports_convention: Option<CssExportsConvention>,
pub exports_only: Option<bool>,
pub local_ident_name: Option<LocalIdentName>,
pub es_module: bool,
pub es_module: Option<bool>,
}

#[derive(Debug, Clone, MergeFrom)]
pub struct CssModuleGeneratorOptions {
pub exports_convention: Option<CssExportsConvention>,
pub exports_only: Option<bool>,
pub local_ident_name: Option<LocalIdentName>,
pub es_module: bool,
pub es_module: Option<bool>,
}

#[derive(Debug, Clone, MergeFrom)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ impl Plugin for CssPlugin {
local_ident_name: None,
exports_only: g.exports_only.expect("should have exports_only"),
named_exports: p.named_exports.expect("should have named_exports"),
es_module: g.es_module,
es_module: g.es_module.expect("should have es_module"),
}) as Box<dyn ParserAndGenerator>
}),
);
Expand All @@ -368,7 +368,7 @@ impl Plugin for CssPlugin {
),
exports_only: g.exports_only.expect("should have exports_only"),
named_exports: p.named_exports.expect("should have named_exports"),
es_module: g.es_module,
es_module: g.es_module.expect("should have es_module"),
}) as Box<dyn ParserAndGenerator>
}),
);
Expand All @@ -393,7 +393,7 @@ impl Plugin for CssPlugin {
),
exports_only: g.exports_only.expect("should have exports_only"),
named_exports: p.named_exports.expect("should have named_exports"),
es_module: g.es_module,
es_module: g.es_module.expect("should have es_module"),
}) as Box<dyn ParserAndGenerator>
}),
);
Expand Down
4 changes: 2 additions & 2 deletions packages/rspack/src/config/adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,7 @@ function getRawCssGeneratorOptions(
return {
exportsConvention: options.exportsConvention,
exportsOnly: options.exportsOnly,
esModule: options.esModule!
esModule: options.esModule
};
}

Expand All @@ -777,7 +777,7 @@ function getRawCssAutoOrModuleGeneratorOptions(
localIdentName: options.localIdentName,
exportsConvention: options.exportsConvention,
exportsOnly: options.exportsOnly,
esModule: options.esModule!
esModule: options.esModule
};
}

Expand Down

0 comments on commit 37ea513

Please sign in to comment.