swc

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

Options

NameDescription
--filename,-f <command>Filename to use when reading from stdin. This will be used in source maps and errors
--config-file <command>Path to a .swcrc file to use
--env-name <command>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 <command>List of glob paths to not compile
--only <command>List of glob paths to only compile
--watch,-wWatch for changes and recompile
--quiet,-qSuppress compilation output
--source-maps,-s <command>Generate source maps
--source-map-target <command>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 <command>Compile all input files into a single file
--out-dir,-d <command>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 <command>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