-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
cwd, source_root, and source_file_name options do not have any effect #1388
Comments
This was referenced Jan 28, 2023
@kdy1 This can be marked as resolved. |
Thank you! |
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Describe the bug
I was trying to figure out why certain options in the CLI weren't working but it looks like the transform functions simply don't do anything with the options listed in the PR title.
Input code
Config
Expected behavior
Here, I'd expect
"sources"
to not have an anonymous filename, and"sourceRoot"
should be set to".."
. When acwd
is passed totransformFileSync
, the source file in the sibling directory should resolve with a path relative tocwd
.Version
The version of @swc/core: 1.2.47
Additional context
I'm currently fighting this when trying to use
@swc/cli
as a drop-in replacement fortsc
, TypeScript generates its maps using paths relative to the output directory, but currently the only way to achieve the same effect with swc is by starting the process from the output directory itself.The text was updated successfully, but these errors were encountered: