fix: Port change in dev server on reload#2283
Merged
Conversation
✅ Deploy Preview for creative-fairy-df92c4 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2283 +/- ##
==========================================
+ Coverage 79.56% 79.62% +0.05%
==========================================
Files 130 130
Lines 3812 3813 +1
Branches 865 865
==========================================
+ Hits 3033 3036 +3
+ Misses 693 691 -2
Partials 86 86 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@wxt-dev/analytics
@wxt-dev/auto-icons
@wxt-dev/browser
@wxt-dev/i18n
@wxt-dev/is-background
@wxt-dev/module-react
@wxt-dev/module-solid
@wxt-dev/module-svelte
@wxt-dev/module-vue
@wxt-dev/runner
@wxt-dev/storage
@wxt-dev/unocss
@wxt-dev/webextension-polyfill
wxt
commit: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Fix yet another regression introduced in v0.20.22... This time we need to modify the config to enforce a consistent port in dev so background changes and server restarts don't change the port.
There was a test covering this case, but it only really tested vite, not the new login in
resolveConfigwhen called a second time... So I added a new one, confirming that it was failing onmain.wxt/packages/wxt/e2e/tests/wxt.test.ts
Lines 7 to 23 in 13527ec
Manual Testing
cd packages/wxt-demo bun devThen save the background file. Before, it would try to connect to a new port, now it keeps the same port.
Related Issue
This closes #2282