-
Notifications
You must be signed in to change notification settings - Fork 156
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(core): warn leading slash for output.distPath.html and default to ./
#3462
feat(core): warn leading slash for output.distPath.html and default to ./
#3462
Conversation
✅ Deploy Preview for rsbuild ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
03c3183
to
8c75ea7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think output.distPath.html
defaults to /
is a mistake, it should default to ./
.
By design, output.distPath.*
can only be relative (except for output.distPath.root
). If we allow all properties to start with /
, I would worry that it might confuse some users.
Yeah, i think so too. |
Yes, we don't want to introduce breaking changes, we can maintain compatibility with the previous behavior and print a warning if the user passes an absolute path to |
…pting absolute path
8c75ea7
to
e57246c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR title can be updated~
@@ -3,7 +3,7 @@ import { join } from 'node:path'; | |||
// Paths | |||
// loaders will be emitted to the same folder of the main bundle | |||
export const ROOT_DIST_DIR = 'dist'; | |||
export const HTML_DIST_DIR = '/'; | |||
export const HTML_DIST_DIR = './'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default value in documentation can be updated too
./
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Summary
Currently the default value of
output.distPath.html
is/
. It's relative tooutput.distPath.root
.But other props(like
js
,css
...) cannot be/
, because they're relative to the root of file system.Related Links
https://rsbuild.dev/config/output/dist-path
Checklist