-
Notifications
You must be signed in to change notification settings - Fork 161
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
[Bug]: source build fails to transform path alias of dependency's dependency #2687
Comments
🤨However, by explicitly adding dep2 to app's project reference, it could be transformed. However I still think this is a corner case that should be taken care by the dev server |
Transfered to Rsbuild repo |
My configuration of
is the correct way. For more information, check @rsbuild/plugin-source-build code.
|
Get, conditional exports without subpath will be supported in next version |
Version
Details
Say there is a monorepo
app
depends ondep
dep
depends ondep2
Now with source build enabled,
app
can transform path aliases ofdep
. However, it cannot transform path aliases ofdep2
.For example,
the same line
import { Person } from '@/decorator';
could be transformed when it is indep
, but cannot be transformed when it is indep2
Reproduce link
https://github.com/yf-yang/modernjs-monorepo-example/tree/resolve-dep-bug
Reproduce Steps
pnpm i cd apps/app pnpm dev
An error would be thrown, telling that
@/decorator
fails to be resolved.By commenting out the
foo2
call indep/src/foo.ts
, the error goes away. Note thatdep/src/foo.ts
also imports from@/decorator
.Can you confirm if this is a modern.js bug or a rspack bug?
The text was updated successfully, but these errors were encountered: