Skip to content

Commit

Permalink
feat(trace): add trace for emotion transform
Browse files Browse the repository at this point in the history
  • Loading branch information
kwonoj committed Apr 1, 2022
1 parent 2f1a2fd commit 099e717
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/next-swc/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/next-swc/crates/core/Cargo.toml
Expand Up @@ -31,6 +31,7 @@ swc_cached = "0.1.1"
swc_css_prefixer = "0.99.3"
tracing = { version = "0.1.32", features = ["release_max_level_info"] }
handlebars = "4.2.1"
swc_trace_macro = "0.1.1"

[dev-dependencies]
swc_ecma_transforms_testing = "0.75.0"
Expand Down
2 changes: 2 additions & 0 deletions packages/next-swc/crates/core/src/emotion/mod.rs
Expand Up @@ -25,6 +25,7 @@ use swc_ecmascript::{
codegen::util::SourceMapperExt,
visit::{swc_ecma_ast::CallExpr, Fold, FoldWith},
};
use swc_trace_macro::swc_trace;

mod hash;

Expand Down Expand Up @@ -164,6 +165,7 @@ pub struct EmotionTransformer<C: Comments> {
in_jsx_element: bool,
}

#[swc_trace]
impl<C: Comments> EmotionTransformer<C> {
pub fn new(options: EmotionOptions, path: &Path, cm: Arc<SourceMap>, comments: C) -> Self {
EmotionTransformer {
Expand Down

0 comments on commit 099e717

Please sign in to comment.