cli icon indicating copy to clipboard operation
cli copied to clipboard

Nested src dir shows up in out dir

Open ewized opened this issue 3 years ago • 1 comments

Using a nested src dir outputs the path in the out dir. Seams like changing --source-root does not solve the issue.

swc src/deep/nested/ --out-dir out/

Current output

project/
  src/deep/nested/
    main.ts
  out/deep/nested/
    main.js
    main.js.map

Expected output

project/
  src/deep/nested/
    main.ts
  out/
    main.js
    main.js.map

Version

"@swc/cli": "^0.1.55", "@swc/core": "^1.2.128"

ewized avatar Jan 12 '22 21:01 ewized

I'm facing the same issue.

With this file structure: c:\1\2\3\4\5\my.ts

When I ran below command:

npx swc c:\1\2\3 -d c:\a\b\c --extensions '.ts' -w

Dest ended up as: c:\a\b\c\1\2\3\4\5\my.js

manikantag avatar Dec 16 '22 03:12 manikantag