-
-
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
Paths configuration prefixes regular modules with specified path #8375
Comments
For now I'm just working around it by moving the entrypoint of the application to the {
"baseUrl": "./src",
"paths": {
"*": ["*"]
}
} That way the |
I see that the issue is seemingly fixed. When is the fix expected to release? I have tried with the latest versions of both the crates and npm packages and the issue still seems to be present. |
I think it's not fixed correctly, sorry |
No worries, here to assist if you need more information! Updated the playground repo to the latest dependencies. |
@kdy1 Is the fix included in the latest published version? Updated the playground example to the latest version but issue is still present. |
Nope, but it should be included in 1.3.106-nightly-20240122.2 |
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. |
Describe the bug
For some reason if you specify a
baseUrl
andpaths
config like you would otherwise intsconfig
, SWC decides to try to resolve regularnode_modules
from the specified paths.Input code
Config
Playground link (or link to the minimal reproduction)
https://github.com/segersniels/swc-paths-issue
SWC Info output
Expected behavior
I would expect
swc
to correctly differentiate between a local file and an actual module fromnode_modules
that node needs to resolve.Actual behavior
Instead of leaving a regular module
@sentry/node
alone,swc
decided to add thesrc/
prefix to the output which stops it from resolving since it thinks it's a local file.Run
npm run build
in the example and look at the output ofdist/index.js
.Version
0.1.63
Additional context
No response
The text was updated successfully, but these errors were encountered: