Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
183 changes: 170 additions & 13 deletions Cargo.lock

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

9 changes: 2 additions & 7 deletions bindings/binding_react_compiler_node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,10 @@ napi-build = { workspace = true }
backtrace = { workspace = true }
napi = { workspace = true, features = ["napi3", "serde-json"] }
napi-derive = { workspace = true, features = ["type-def"] }
react_compiler = { path = "../../crates/react_compiler" }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
tracing = { workspace = true, features = ["release_max_level_info"] }


swc_core = { path = "../../crates/swc_core", features = [
"allocator_node",
"common_sourcemap",
"ecma_ast",
"ecma_parser",
] }
swc_ecma_react_compiler = { path = "../../crates/swc_ecma_react_compiler" }
swc_malloc = { path = "../../crates/swc_malloc" }
8 changes: 8 additions & 0 deletions bindings/binding_react_compiler_node/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,11 @@ fn init() {
}));
}
}

/// Output returned by the native React Compiler binding.
#[napi(object)]
pub struct TransformOutput {
pub code: String,
pub map: Option<String>,
pub diagnostics: Vec<String>,
}
Loading
Loading