Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested src dir shows up in out dir #108

Open
ewized opened this issue Jan 12, 2022 · 1 comment
Open

Nested src dir shows up in out dir #108

ewized opened this issue Jan 12, 2022 · 1 comment

Comments

@ewized
Copy link

ewized commented Jan 12, 2022

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"

kimhongsu pushed a commit to kimhongsu/cli that referenced this issue Mar 12, 2022
kimhongsu pushed a commit to kimhongsu/cli that referenced this issue Mar 14, 2022
kimhongsu pushed a commit to kimhongsu/cli that referenced this issue Mar 14, 2022
kimhongsu pushed a commit to kimhongsu/cli that referenced this issue Mar 14, 2022
@manikantag
Copy link

manikantag commented Dec 16, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants