-
Notifications
You must be signed in to change notification settings - Fork 183
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]: Alias Not Working #4650
Comments
try |
run DEBUG=rsbuild npm run build:rsbuild, /dist/.rsbuild/rspack.config.web.mjs |
So this worked, thank you! Here are the differences: ![]() https://www.diffchecker.com/L8kbYtRj/ Is there a reason why this is not working in rsbulid compared to rspack? |
in rsbuild, aslias relative paths need to be turned into absolute paths. |
We will update the documentation, thank you |
A new discovery: In a TypeScript project, configuring paths can make aliasing effective. |
@chenjiahan Thanks for quickly updating the docs! Is it possible to pass the aliases from Rsbuild to Rspack in the tool config, so my alias setup would work directly? |
yes you can use tools.rspack.resolve.alias |
Version
System: OS: macOS 15.3.1 CPU: (12) arm64 Apple M2 Pro Memory: 102.72 MB / 32.00 GB Shell: 5.9 - /bin/zsh Browsers: Chrome: 133.0.6943.127 Edge: 133.0.3065.82 Safari: 18.3 npmPackages: @rsbuild/core: ^1.2.8 => 1.2.11
Details
It seems that aliasing is not working properly for Rsbuild, when it works for Rspack.
I tried to make the two configs pretty much the same, but still no luck.
Reproduce link
https://github.com/PointSingularity/rsbuild-repro
Reproduce Steps
Run
npm i
first.Rspack works:
npm run build:rspack
Rsbuild does not:
npm run build:rsbuild
Error:
The text was updated successfully, but these errors were encountered: