Skip to content

Commit

Permalink
docs: update misc (#17863)
Browse files Browse the repository at this point in the history
  • Loading branch information
sapphi-red authored Aug 20, 2024
1 parent ec00425 commit 8b33ca2
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ export default defineConfig({
link: '/guide/philosophy',
},
{
text: 'Migration from v4',
text: 'Migration from v5',
link: '/guide/migration',
},
{
Expand Down
2 changes: 1 addition & 1 deletion docs/changes/hotupdate-hook.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Give us feedback at [Environment API feedback discussion](https://github.com/vit

We're planing to deprecate the `handleHotUpdate` plugin hook in favor of [`hotUpdate` hook](/guide/api-vite-environment#the-hotupdate-hook) to be [Environment API](/guide/api-vite-environment.md) aware, and handle additional watch events with `create` and `delete`.

Affected: `Vite Plugin Authors`
Affected scope: `Vite Plugin Authors`

::: warning Future Deprecation
`hotUpdate` was first introduced in `v6.0`. The deprecation of `handleHotUpdate` is planned for `v7.0`. We don't yet recommend moving away from `handleHotUpdate` yet. If you want to experiment and give us feedback, you can use the `future.deprecationWarnings.pluginHookHandleHotUpdate` to `true` in your vite config.
Expand Down
4 changes: 2 additions & 2 deletions docs/changes/this-environment-in-hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ export function myPlugin(): Plugin {
return {
name: 'my-plugin',
resolveId(id, importer, options) {
const isSSR = options.ssr // [!CODE --]
const isSSR = this.environment.name !== 'client' // [!CODE ++]
const isSSR = options.ssr // [!code --]
const isSSR = this.environment.name !== 'client' // [!code ++]

if (isSSR) {
// SSR specific logic
Expand Down
6 changes: 0 additions & 6 deletions docs/guide/api-vite-environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,6 @@ class DevEnvironment {
* modules are already processed when they are requested.
*/
async warmupRequest(url: string): void

/**
* Fetch information about a module from the module runner without running it.
* Note: This method may not be needed
*/
async fetchModuleInfo(url: string)
}
```

Expand Down
3 changes: 3 additions & 0 deletions docs/public/_redirects
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# temporary, we'll flip this around some day
https://vite.dev/* https://vitejs.dev/:splat 302!

/guide/api-vite-runtime /guide/api-vite-environment 302
/guide/api-vite-runtime.html /guide/api-vite-environment 302

0 comments on commit 8b33ca2

Please sign in to comment.