Skip to content

Commit f5b68f0

Browse files
committed
fix: comments
1 parent 3e8db91 commit f5b68f0

File tree

1 file changed

+4
-3
lines changed
  • packages/react/transform/crates/swc_plugin_css_scope

1 file changed

+4
-3
lines changed

packages/react/transform/crates/swc_plugin_css_scope/lib.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ where
7070
pub fn new(cfg: CSSScopeVisitorConfig, comments: Option<C>) -> Self {
7171
CSSScopeVisitor {
7272
css_id: usize::from_str_radix(&calc_hash(&cfg.filename), 16).expect("should have css id")
73+
// cssId for `@file` starts from `1` and auto increases one by one
74+
// to avoid cssId collision, we start our cssId from `1e6`, so that
75+
// we will never collide with `cssId` of `@file` if user have less than 1e6 css files
7376
+ 1e6 as usize,
74-
// cssId for `@file` starts from `1` and auto increases one by one
75-
// to avoid cssId collision, we start our cssId from `1e6`, so that
76-
// we will never collide with `cssId` of `@file` if user have less than 1e6 css files
7777
comments,
7878
cfg,
7979
has_jsx: false,
@@ -130,6 +130,7 @@ where
130130
continue;
131131
}
132132

133+
// Is sideEffects import or force scoped
133134
if re.is_match(import_decl.src.value.to_string().as_str()) {
134135
// Is CSS files
135136
//

0 commit comments

Comments
 (0)