-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Bump vite to beta #11979
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
Merged
Merged
Bump vite to beta #11979
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
c102ff2
Bump vite to beta
bluwy 3f242c2
Fix attempt 1
bluwy 7565fe7
Fix attempt 2
bluwy 13a3b1e
Workaround addWatchFile bug for now
bluwy 99d46f3
Merge branch 'next' into plt-2516-bump-vite-beta
bluwy 7c73268
Merge branch 'next' into plt-2516-bump-vite-beta
bluwy e767b8e
Merge branch 'next' into plt-2516-bump-vite-beta
bluwy 952fb56
Bump to beta.2
bluwy 72fba99
Fix
bluwy 3d1202b
Add changesets
bluwy f000800
Add todo comment [skip ci]
bluwy 5a5e812
Merge branch 'next' into plt-2516-bump-vite-beta
bluwy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'astro': major | ||
--- | ||
|
||
Bumps `vite` dependency to v6.0.0-beta.2. The version is pinned and will be updated as new Vite versions publish to prevent unhandled breaking changes. For the full list of Vite-specific changes, see [its changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md). |
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import type { EnvironmentModuleNode, Plugin } from 'vite'; | ||
|
||
/** | ||
* The very last Vite plugin to reload the browser if any SSR-only module are updated | ||
* which will require a full page reload. This mimics the behaviour of Vite 5 where | ||
* it used to unconditionally reload for us. | ||
*/ | ||
export default function hmrReload(): Plugin { | ||
return { | ||
name: 'astro:hmr-reload', | ||
enforce: 'post', | ||
hotUpdate: { | ||
order: 'post', | ||
handler({ modules, server, timestamp }) { | ||
if (this.environment.name !== 'ssr') return; | ||
|
||
let hasSsrOnlyModules = false; | ||
|
||
const invalidatedModules = new Set<EnvironmentModuleNode>(); | ||
for (const mod of modules) { | ||
if (mod.id == null) continue; | ||
const clientModule = server.environments.client.moduleGraph.getModuleById(mod.id); | ||
if (clientModule != null) continue; | ||
|
||
this.environment.moduleGraph.invalidateModule(mod, invalidatedModules, timestamp, true); | ||
hasSsrOnlyModules = true; | ||
} | ||
|
||
if (hasSsrOnlyModules) { | ||
server.ws.send({ type: 'full-reload' }); | ||
return []; | ||
} | ||
}, | ||
}, | ||
}; | ||
} |
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.