Cargo Features
[dependencies]
swc_ecmascript = { version = "6.0.0", default-features = false, features = ["codegen", "concurrent", "minifier", "parser", "preset_env", "quote", "rkyv-impl", "transforms", "utils", "visit", "typescript-parser", "compat", "module", "optimization", "proposal", "react", "typescript"] }
- default = typescript-parser
-
The
typescript-parser
feature is set by default wheneverswc_ecmascript
is added without
somewhere in the dependency tree.default-features = false - codegen = swc_ecma_codegen
- concurrent
-
Enables concurrent of swc_ecma_minifier
swc_ecma_minifier:
This enables global concurrent mode
- minifier = swc_ecma_minifier
- parser = swc_ecma_parser
- preset_env = swc_ecma_preset_env
- quote = swc_ecma_quote
- rkyv-impl
-
Enables rkyv-impl of swc_ecma_ast
- transforms = swc_ecma_transforms
- utils = swc_ecma_utils
- visit = swc_ecma_visit
- typescript-parser default typescript?
-
Enables typescript of swc_ecma_parser
- compat
-
Enables compat of swc_ecma_transforms
- module
-
Enables module of swc_ecma_transforms
- optimization
-
Enables optimization of swc_ecma_transforms
- proposal
-
Enables proposal of swc_ecma_transforms
- react
-
Enables react of swc_ecma_transforms
- typescript = typescript-parser
-
Enables typescript of swc_ecma_transforms
Features from optional dependencies
In crates that don't use the dep:
syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.