-
-
Notifications
You must be signed in to change notification settings - Fork 595
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
feat(rspack_core): configurable tsconfig project references #4290
Conversation
!canary |
@chenjiahan can you help test it in modernjs sourceBuild tests |
I'd love to, can you provide a canary version? |
Or you can merge it and we will test it tomorrow. |
0.3.6-canary-9cae447-20231008135313 |
here you are @chenjiahan |
I'm trying to use the new resolver and references in Modern.js, but I got this error: @Boshen can you help to figure it out? Reproduce steps: git clone [email protected]:web-infra-dev/modern.js.git
git checkout tsconfig_references_1009
pnpm i
cd tests/integration/source-code-build/app
PROVIDE_TYPE=rspack pnpm dev |
@chenjiahan There is a small bug related to resolving After this is fixed, it shows that This is due to |
@chenjiahan Is it because you specified I'm not really up to date around workspace dependencies and project references ... |
When using |
@chenjiahan I ran
How did you make it run successfully with webpack? |
@chenjiahan webpack works because the app's If you print out
This |
Nice catch! This is a difference between the webpack and rspack modes of modern.js, I will fix it. |
9cae447
to
40511f9
Compare
Are there any more blockers? |
Time to merge! I will do some more testing later. |
closes #4211
Summary
See #4211 for background.
This PR aligns the tsconfig option with https://github.com/dividab/tsconfig-paths-webpack-plugin#options
The original
resolve#tsConfigPath
option is not removed nor deprecated in this PR.For better ux, the
tsconfig#references
option has an additionalauto
value where the values of project references can be automatically picked up fromtsconfig.json
.Test Plan
Two test cases are added to rspack tests:
packages/rspack/tests/configCases/resolve-new/tsconfig-project-references-auto
: uses project references defined in tsconfig.jsonpackages/rspack/tests/configCases/resolve-new/tsconfig-project-references-manual
: uses project references defined in webpack.config.js#resolve#references.Require Documentation?