docs: improve migration from v2 guide #8417
Merged
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.
Description
I checked the commit log from 2.9.8 and added descriptions for breaking changes which was missing.
There are potentially breaking changes which I didn't include.
generatedCode: 'es2015'
for rollup build #5018/// <reference lib="dom" />
is removed fromvite/client.d.ts
. This only affects users who does not have either{"lib": ["dom"]}
nor{"lib": ["webworker"]}
intsconfig.json
.unbuild
to bundle plugins #8139exports
field now exists. For example, it breaks if someone is importingvite/dist/node/cli.js
directly which rarely happens.server.force
option was removed in favor offorce
option.And some which only affects plugin/tool creators which I didn't include.
printHttpServerUrls
is removedserver.app
,server.transformWithEsbuild
are removedimport.meta.hot.acceptDeps
is removedssrLoadModule
'sfixStacktrace
option's default is nowfalse
formatPostcssSourceMap
is now asyncresolvePackageEntry
,resolvePackageData
are no longer available from CJS build (dynamic import is needed to use in CJS)Also I didn't include breaking changes of plugins.
options.parserPlugins
is removedentryFileNames
for polyfill chunks #8247vite/legacy-polyfills
in manifest is nowvite/legacy-polyfills-legacy
.polyfills-modern.hash.js
is nowpolyfills.hash.js
.Additional context
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).