Skip to content
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

docs: update changes page #18026

Merged
merged 3 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ export default defineConfig({
link: '/guide/migration',
},
{
text: 'Major Changes',
text: 'Breaking Changes',
link: '/changes/',
},
],
Expand Down Expand Up @@ -338,7 +338,7 @@ export default defineConfig({
],
'/changes/': [
{
text: 'Major Changes',
text: 'Breaking Changes',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One reason to call it "Major Changes" was to avoid the need to force us to document every Breaking Change in the same way. It is kind of "Major Breaking Changes". But probably having breaking here is more clear and we don't need to feel the pressure to have small breaking changes guides.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's true, maybe we can mention not all breaking changes are listed here? Or do you think we should still stick with major changes?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's merge and then we can continue refining this later. I think we should at least mention that only major breaking changes will be documented in this way

link: '/changes/',
},
{
Expand Down
20 changes: 12 additions & 8 deletions docs/changes/index.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
# Major Changes
# Breaking Changes

This is a list of major changes in Vite and planned future deprecations/removals.
List of breaking changes in Vite including API deprecations, removals, and changes. Most of the changes below can be opt-in using the [`future` option](/config/shared-options.html#future) in your Vite config.

## Current
## Planned

We're reaching out to framework, plugin authors, and users to apply these changes. Deprecation or usage warnings will guide you where possible.
These changes are planned for the next major version of Vite. The deprecation or usage warnings will guide you where possible, and we're reaching out to framework, plugin authors, and users to apply these changes.

## Future
- _No planned changes yet_

These are experimental APIs that intend to improve upon current usage patterns. There are more experimental APIs that the ones listed here. For a complete list of experimental features, please checkout the [Experimental Label in Vite GitHub Discussions](https://github.com/vitejs/vite/discussions/categories/feedback?discussions_q=label%3Aexperimental+category%3AFeedback).
## Considering

We don't recommend switching to these APIs yet. They are included in Vite to help us gather feedback. Please check these proposals and let us know how they work in your use case using the linked Discussions in each.
These changes are being considered and are often experimental APIs that intend to improve upon current usage patterns. As not all changes are listed here, please check out the [Experimental Label in Vite GitHub Discussions](https://github.com/vitejs/vite/discussions/categories/feedback?discussions_q=label%3Aexperimental+category%3AFeedback) for the full list.

We don't recommend switching to these APIs yet. They are included in Vite to help us gather feedback. Please check these proposals and let us know how they work in your use case in each's linked GitHub Discussions.

- [`this.environment` in Hooks](/changes/this-environment-in-hooks)
- [HMR `hotUpdate` Plugin Hook](/changes/hotupdate-hook)
Expand All @@ -20,4 +22,6 @@ We don't recommend switching to these APIs yet. They are included in Vite to hel

## Past

The following are changes done in the past, where the usage that replaced are no longer used by a significant portion of users.
The changes below has been done or reverted. They are no longer relevant in the current major version.

- _No past changes yet_
9 changes: 9 additions & 0 deletions docs/config/shared-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -490,3 +490,12 @@ Whether your application is a Single Page Application (SPA), a [Multi Page Appli
- `'custom'`: don't include HTML middlewares

Learn more in Vite's [SSR guide](/guide/ssr#vite-cli). Related: [`server.middlewareMode`](./server-options#server-middlewaremode).

## future

- **Type:** `Record<string, 'warn' | undefined>`
- **Related:** [Breaking Changes](/changes/)

Enable future breaking changes to prepare for a smooth migration to the next major version of Vite. The list may be updated, added, or removed at any time as new features are developed.

See the [Breaking Changes](/changes/) page for details of the possible options.
2 changes: 1 addition & 1 deletion docs/guide/api-environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,7 @@ The current Vite server API are not yet deprecated and are backward compatible w

The `server.moduleGraph` returns a mixed view of the client and ssr module graphs. Backward compatible mixed module nodes will be returned from all its methods. The same scheme is used for the module nodes passed to `handleHotUpdate`.

We don't recommend switching to Environment API yet. We are aiming for a good portion of the user base to adopt Vite 6 before so plugins don't need to maintain two versions. Checkout the future major changes section for information on future deprecations and upgrade path:
We don't recommend switching to Environment API yet. We are aiming for a good portion of the user base to adopt Vite 6 before so plugins don't need to maintain two versions. Checkout the future breaking changes section for information on future deprecations and upgrade path:

- [`this.environment` in Hooks](/changes/this-environment-in-hooks)
- [HMR `hotUpdate` Plugin Hook](/changes/hotupdate-hook)
Expand Down