swc-project / pkgs

node.js packages for SWC
62 stars 20 forks source link

`npx swc src -d build` outputs files into `build/src` instead of `build` #28

Closed 3axap4eHko closed 8 months ago

3axap4eHko commented 8 months ago

When using npx swc to compile and output files from the src directory to the build directory using the command npx swc src -d build, the output is incorrectly placed into build/src instead of directly into build. This behavior is unexpected and diverges from the documentation (or expected behavior) where the output should directly be in the build directory.

kdy1 commented 8 months ago

See --strip-leading-paths

kdy1 commented 8 months ago

https://swc.rs/docs/usage/cli#--strip-leading-paths

3axap4eHko commented 8 months ago

@kdy1 is there anything similar for swcx?