swc
SWC is a super-fast compiler written in rust; producing widely-supported javascript from modern standards and typescript
Options
Name | Description |
---|---|
--filename, -f <FILE> | Filename to use when reading from stdin. This will be used in source maps and errors |
--config-file <CONFIG_FILE> | Path to a .swcrc file to use |
--env-name <ENV_NAME> | The name of the 'env' to use when loading configs and plugins. Defaults to the value of SWC_ENV, or else NODE_ENV, or else development |
--no-swcrc | Whether or not to look up .swcrc files |
--ignore <PATH> | List of glob paths to not compile |
--only <PATH> | List of glob paths to only compile |
--watch, -w | Watch for changes and recompile |
--quiet, -q | Suppress compilation output |
--source-maps, -s <SOURCE_MAP> | Generate source maps |
--source-map-target <FILE> | Define the file for the source map |
--source-file-name | Set sources[0] on returned source map |
--source-root | The root from which all sources are relative |
--out-file, -o <OUTPUT_FILE> | Compile all input files into a single file |
--out-dir, -d <OUTPUT_DIR> | Compile an input directory of modules into an output directory |
--copy-files, -D | When compiling a directory, copy over non-compilable files |
--include-dotfiles | Include dotfiles when compiling and copying non-compilable files |
--config, -C <CONFIG_FILE> | Override a config from .swcrc file |
--sync | Invoke swc synchronously. Useful for debugging |
--log-watch-compilation | Log a message when a watched file is successfully compiled |
--extensions | Log a message when a watched file is successfully compiled |