Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(css/modules): Preserve spans of CSS class names #7185

Merged
merged 9 commits into from
Apr 1, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/swc_css_ast/src/value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use swc_common::{ast_node, util::take::Take, EqIgnoreSpan, Span};
use crate::Function;

#[ast_node("Ident")]
#[derive(Eq, Hash)]
#[derive(Eq, PartialOrd, Ord, Hash)]
pub struct Ident {
pub span: Span,
#[cfg_attr(feature = "rkyv", with(swc_atoms::EncodeJsWord))]
Expand Down
6 changes: 3 additions & 3 deletions crates/swc_css_modules/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ pub trait TransformConfig {
pub enum CssClassName {
Local {
/// Tranformed css class name
name: JsWord,
name: Ident,
},
Global {
name: JsWord,
name: Ident,
},
Import {
/// The exported class name. This is the value specified by the user.
name: JsWord,
name: Ident,
/// The module specifier.
from: JsWord,
},
Expand Down