diff --git a/pages/docs/usage/cli.mdx b/pages/docs/usage/cli.mdx index e826880a..0a7f083a 100644 --- a/pages/docs/usage/cli.mdx +++ b/pages/docs/usage/cli.mdx @@ -194,3 +194,11 @@ npx swc input.js --log-watch-compilation ### --extensions Use specific extensions. + +### --strip-leading-paths + +Remove the leading directory (including all parent relative paths) when building the final output path. As an example it compiles all modules under `src` folder to `dist` folder, without create the `src` folder inside of `dist`. + +```sh +npx swc src -d dist --strip-leading-paths +```