Author | Yan Garden
Recently, YouYuxi announced that Vue 3 will become the new default version on February 7, 2022.
GitHub's announcement reads, "Developers should pay attention to the actions they may need to take to confirm whether they need to make changes before switching to the default version to avoid exceptions." ”
The following is the original text of you yuxi's announcement:
From libraries to frameworks
In the beginning, Vue was just a runtime library. But over the years, it has evolved into a framework with many sub-projects:
The core library, the vue npm package
The content is sufficient as a document for a book
Build toolchains (Vue CLI, Vue Loader, and other support packages)
Routing Vue Router for building single-page applications
Vuex for state management
Browser developer tools extension for debugging and analysis
VSCode extension Vetur to support the development of single-file components
ESLint plugin for static style/error checking
Vue Test Utils for component testing
Custom JSX Babel plug-ins that take advantage of Vue runtime features
VuePress for static website generation
It's because Vue is a community-driven project that makes this possible. Many of these projects were initiated by community members who later became members of the Vue team. The rest of the projects were originally initiated by me, but now they are almost entirely maintained by the team, except for the core libraries.
Vue 3's "Soft Release"
As new major versions of the core library are released, all other parts of the framework also need to be updated together. We also need to provide an upgrade scenario for Vue 2 users. For a community-driven team like Vue, that's a huge project. By the time Vue 3's core library was complete, the rest of the framework was either still in beta or hadn't started adapting to Vue 3 yet. Our decision was to release the core library first, so that early users could use it first, and developers of the library and the upper framework could adapt it first, while we continued to update the rest of the framework.
During this process, we left Vue 2 as the default version for documentation and npm installation. That's because we know that for most users, Vue 2 still provides a more consistent and complete experience until the rest of Vue 3 is perfected.
Brand new Vue
The "soft release" process took longer than expected, but the moment finally arrived: we are pleased to announce that Vue 3 will become the new default version on February 7, 2022.
In addition to the Vue core library, we've improved almost every aspect of the framework.
Blazing-fast build toolchain based on Vite
Brings a more silky development experience to the combined API syntax
TypeScript IDE support for the single-file component provided by Volar
vue-tsc provides command-line type checking and build for single-file components
Pinia provides more streamlined state management
New developer tools extensions that also support Vue 2/Vue 3 and provide a plugin system that allows the community library to extend the Developer Tools panel on its own.
We also completely rewrite the main documentation. The new vuejs.org (currently pending release, Chinese translations are still in progress) will provide an up-to-date framework overview and development recommendations, flexible learning paths for users of different backgrounds, the ability to switch between optional and composable APIs throughout the guide and examples, and many new in-depth chapters. The new documentation itself also performs very well on the site – we'll explore that in more detail in another blog post shortly thereafter.
Version switching details
Below are the specifics of what we call the "new default version". Also, read the Action you might want to take section to see if you need to make changes to avoid exceptions before switching to the default version.
npm publishes labels
npm install vue installs Vue 3 by default.
The latest release label for all other official npm packages will point to compatible versions of their Vue 3, including vue-router, vuex, vue-loader, and @vue/test-utils.
Official documentation and sites
All documentation and official sites will switch to Vue 3 by default. include:
Note that the new vuejs.org will be a completely rewritten version, not the version currently deployed in v3.vuejs.org.
The current version of Vue 2 for these sites will be migrated to the new address (the version prefix represents the respective version of the library, not the version of the Vue core library):
GitHub repositories
At the time of writing, the repository-related changes have already taken effect.
All GitHub repositories under the vuejs organization will switch the default branch to the version corresponding to Vue 3. Additionally, the following repositories will be renamed to remove next from their names:
vuejs/vue-next -> vuejs/core
vuejs/vue-router-next -> vuejs/router
vuejs/docs-next -> vuejs/docs
vuejs/vue-test-utils-next -> vuejs/test-utils
vuejs/jsx-next -> vuejs/babel-plugin-jsx
In addition, the translation repository for the main document will be moved to the vuejs-translations organization.
GitHub automatically handles repository redirects, so the link to the previous source code to the issue issue should still work.
Developer Tools extensions
Developer Tools v6 is currently released to the beta channel of the Chrome Web Store, and will be moved to the stable channel after the version switch.
The current stable channel is still available. It will be migrated to legacy channels.
Actions that may be required
The version of the CDN link is not specified
If you use Vue 2 through a CDN link without specifying a version, make sure to specify a version range with @2:
Note: Even with Vue 3, you should always specify a version range in your production environment to avoid accidental loading into future larger versions.
npm latest tag
If you use the latest tag or * to install Vue or other official libraries from npm, update to explicitly use a version that is compatible with Vue 2:
English original address:
https://blog.vuejs.org/posts/vue-3-as-the-new-default.html