swc

SWC is a super-fast compiler written in rust; producing widely-supported javascript from modern standards and typescript

Options

NameDescription
--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-swcrcWhether 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, -wWatch for changes and recompile
--quiet, -qSuppress compilation output
--source-maps, -s <SOURCE_MAP>Generate source maps
--source-map-target <FILE>Define the file for the source map
--source-file-nameSet sources[0] on returned source map
--source-rootThe 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, -DWhen compiling a directory, copy over non-compilable files
--include-dotfilesInclude dotfiles when compiling and copying non-compilable files
--config, -C <CONFIG_FILE>Override a config from .swcrc file
--syncInvoke swc synchronously. Useful for debugging
--log-watch-compilationLog a message when a watched file is successfully compiled
--extensionsLog a message when a watched file is successfully compiled