Skip to content

Commit

Permalink
merge vite@b80d5ec
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Nov 20, 2024
1 parent e1928c2 commit e72aa84
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions docs/changes/hotupdate-hook.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ interface HmrContext {

This hook is called once for all environments, and the passed modules have mixed information from the Client and SSR environments only. Once frameworks move to custom environments, a new hook that is called for each of them is needed.

The new `hotUpdate` hook works in the same way as `handleHotUpdate` but it is called for each environment and receives a new `HotUpdateContext` instance:
The new `hotUpdate` hook works in the same way as `handleHotUpdate` but it is called for each environment and receives a new `HotUpdateOptions` instance:

```ts
interface HotUpdateContext {
interface HotUpdateOptions {
type: 'create' | 'update' | 'delete'
file: string
timestamp: number
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/api-environment-plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Plugins should set default values using the `config` hook. To configure each env
The `hotUpdate` hook allows plugins to perform custom HMR update handling for a given environment. When a file changes, the HMR algorithm is run for each environment in series according to the order in `server.environments`, so the `hotUpdate` hook will be called multiple times. The hook receives a context object with the following signature:
```ts
interface HotUpdateContext {
interface HotUpdateOptions {
type: 'create' | 'update' | 'delete'
file: string
timestamp: number
Expand Down
2 changes: 2 additions & 0 deletions docs/guide/migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ There are other breaking changes which only affect few users.
- This PR not only introduces a breaking change mentioned above as "Default value for `resolve.conditions`", but also makes `resolve.mainFields` to not be used for no-externalized dependencies in SSR. If you were using `resolve.mainFields` and want to apply that to no-externalized dependencies in SSR, you can use [`ssr.resolve.mainFields`](/config/ssr-options#ssr-resolve-mainfields).
- [[#18493] refactor!: remove fs.cachedChecks option](https://github.com/vitejs/vite/pull/18493)
- This opt-in optimization was removed due to edge cases when writing a file in a cached folder and immediately importing it.
- [[#18697] fix(deps)!: update dependency dotenv-expand to v12](https://github.com/vitejs/vite/pull/18697)
- Variables used in interpolation should be declared before the interpolation now. For more details, see [the `dotenv-expand` changelog](https://github.com/motdotla/dotenv-expand/blob/v12.0.1/CHANGELOG.md#1200-2024-11-16).

## Migration from v4

Expand Down

0 comments on commit e72aa84

Please sign in to comment.