-
Notifications
You must be signed in to change notification settings - Fork 372
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
fix(builder-shared): The http://0.0.0.0:port can't visit in windows #3443
Conversation
…ublicPath as //0.0.0.0:${port}/
🦋 Changeset detectedLatest commit: 419f647 The changes in this PR will be included in the next version bump. This PR includes changesets to release 213 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #3443 +/- ##
==========================================
+ Coverage 57.59% 57.94% +0.34%
==========================================
Files 672 668 -4
Lines 17794 17723 -71
Branches 3876 3852 -24
==========================================
+ Hits 10249 10270 +21
+ Misses 6934 6846 -88
+ Partials 611 607 -4
... and 74 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
//0.0.0.0:${port}/
;
//0.0.0.0:${port}/
;//0.0.0.0:${port}/
;
//0.0.0.0:${port}/
;
Summary
🤖 Generated by Copilot at 4911ea3
This pull request fixes a bug in the asset-prefix feature of the
@modern-js/builder-shared
package, which caused problems in Windows systems when using0.0.0.0
as the hostname for the publicPath option in the webpack output configuration. It updates thegetPublicPath
function, theindex.test.ts
file, and the.changeset
file accordingly.Details
🤖 Generated by Copilot at 4911ea3
0.0.0.0
as the hostname for the publicPath option in the webpack output configuration, which causes problems in Windows systems (link, link).changeset
file with fix messages in English and Chinese, indicating a patch-level change for the@modern-js/builder-shared
package (link)getPublicPath
function inoutput.ts
to check if the hostname is not equal to0.0.0.0
, and only set the publicPath to//${hostname}:${port}/
if that is the case, otherwise leave it as an empty string (link)@modern-js/builder-shared
package to reflect the change in the publicPath option (link, link, link, link)DEFAULT_DEV_HOST
constant from@modern-js/utils
(link)/static/js/
part of the publicPath in the HTML file, instead of the//${DEFAULT_DEV_HOST}:3333
part (link)//${DEFAULT_DEV_HOST}:3333
(link)http://localhost:3333
as the URL, instead ofhttp:${expected}
(link)Related Issue
Checklist
pnpm run change
.