rsnext/packages/next-swc/crates/napi/Cargo.toml
2022-10-19 03:04:32 +00:00

74 lines
2.1 KiB
TOML

[package]
edition = "2018"
name = "next-swc-napi"
version = "0.0.0"
publish = false
[lib]
crate-type = ["cdylib", "rlib"]
[features]
default = []
# Instead of enabling all the plugin-related features by default, make it explicitly specified
# when build (i.e napi --build --features plugin), same for the wasm as well.
# this is due to some of transitive dependencies have features cannot be enabled at the same time
# (i.e wasmer/default vs wasmer/js-default) while cargo merges all the features at once.
plugin = [
"swc_core/plugin_transform_host_native",
"next-swc/plugin"
]
sentry_native_tls = ["_sentry_native_tls"]
sentry_rustls = ["_sentry_rustls"]
[dependencies]
anyhow = "1.0"
backtrace = "0.3"
fxhash = "0.2.1"
napi = {version = "2", default-features = false, features = ["napi3", "serde-json"]}
napi-derive = "2"
next-swc = {version = "0.0.0", path = "../core"}
once_cell = "1.13.0"
serde = "1"
serde_json = "1"
swc_core = { features = [
"allocator_node",
"base_concurrent", # concurrent?
"base_node",
"common_concurrent",
"ecma_ast",
"ecma_loader_node",
"ecma_loader_lru",
"bundler",
"bundler_concurrent",
"ecma_codegen",
"ecma_minifier",
"ecma_parser",
"ecma_parser_typescript",
"ecma_transforms",
"ecma_transforms_optimization",
"ecma_transforms_react",
"ecma_transforms_typescript",
"ecma_utils",
"ecma_visit",
], version = "0.39.7" }
tracing = { version = "0.1.32", features = ["release_max_level_info"] }
tracing-futures = "0.2.5"
tracing-subscriber = "0.3.9"
tracing-chrome = "0.5.0"
# There are few build targets we can't use native-tls which default features rely on,
# allow to specify alternative (rustls) instead via features.
# Note to opt in rustls default-features should be disabled
# (--no-default-features --features sentry_rustls)
_sentry_native_tls = { package = "sentry", version = "0.27.0", optional = true }
_sentry_rustls = { package = "sentry", version = "0.27.0", default-features = false, features = [
"backtrace",
"contexts",
"panic",
"rustls",
"reqwest"
], optional = true }
[build-dependencies]
napi-build = "2"
serde = "1"
serde_json = "1"