Releases: vuejs/core
v3.1.0 Pluto
Features
- Migration Build: a build of Vue 3 that provides Vue 2 compatible behavior. The Migration Build is intended to help migrating existing Vue 2 apps to Vue 3.
- compiler-core: whitespace handling strategy (dee3d6a)
- support component-level
compilerOptions
when using runtime compiler (ce0bbe0) - config: support configuring runtime compiler via
app.config.compilerOptions
(091e6d6) - support casting plain element to component via is="vue:xxx" (af9e699)
- devtools: improved KeepAlive support (03ae300)
- devtools: performance events (f7c54ca)
- onServerPrefetch (#3070) (349eb0f)
Performance Improvements
- only trigger
$attrs
update when it has actually changed (5566d39) - compiler: skip unncessary checks when parsing end tag (048ac29)
- avoid deopt for props/emits normalization when global mixins are used (51d2be2)
Deprecations
app.config.isCustomElement
has been deprecated and should be now nested underapp.config.compilerOptions
. [Docs]delimiters
component option has been deprecated and should now be nested under thecompilerOptions
component option. [Docs]v-is
has been deprecated in favor ofis="vue:xxx"
[Docs]
Minor Breaking Changes
-
this.$props
and theprops
object passed tosetup()
now always contain all the keys for declared props, even for props that are absent (4fe4de0). This has always been the behavior in Vue 2 and is therefore considered a fix (see reasoning in #3288). However, this could break Vue 3 code that relied on the keys for prop absence checks. The workaround is to use a Symbol default value for props that need absence checks:const isAbsent = Symbol() export default { props: { foo: { default: isAbsent } }, setup(props) { if (props.foo === isAbsent) { // foo is absent } } }
-
optionMergeStrategies
functions no longer receive
the component instance as the 3rd argument. The argument was technically
internal in Vue 2 and only used for generating warnings, and should not
be needed in userland code. This removal enables much more efficient
caching of option merging.
Bug Fixes
- compat: revert private properties on $options in comapt mode (ad844cf), closes #3883
- runtime-core: fix fragment update inside de-opt slots (5bce2ae), closes #3881
- compat: fix deep data merge with extended constructor (c7efb96), closes #3852
- compiler-sfc: fix style injection when using normal script + setup (8b94464), closes #3688
- compiler-sfc: fix template expression assignment codegen for script setup let refs (#3626) (2c7bd42), closes #3625
- runtime-core: align option merge behavior with Vue 2 (e2ca67b), closes #3566 #2791
- runtime-dom/v-model: only set selectedIndex when the value changes (#3845) (ecd97ee)
- suspense: fix suspense regression for errored template component (44996d1), closes #3857
- watch: avoid traversing objects that are marked non-reactive (9acc9a1)
- compiler-core: improve the isMemberExpression function (#3675) (9b2e894)
- compiler-dom: fix in-browser attribute value decoding w/ html tags (6690372), closes #3001
- compiler-sfc: correctly remove parens used for wrapping (#3582) (6bfb50a), closes #3581
- reactivity: ensure computed always expose value (03a7a73), closes #3099 #910
- runtime-core: fix cases of reused children arrays in render functions (#3670) (a641eb2), closes #3666
- runtime-core: fix resolving inheritAttrs from mixins (#3742) (d6607c9), closes #3741
- runtime-core: should disable tracking inside directive lifecycle hooks (#3699) (ff50e8d)
- runtime-core: stricter compat root mount check (32e2133)
- runtime-dom: should remove attribute when binding
null
tovalue
(#3564) (e3f5dcb) - suspense: fix suspense patching in optimized mode (9f24195), closes #3828
- transition: fix higher order transition components with merged listeners (071986a), closes #3227
- keep-alive: include/exclude should work with async component (#3531) (9e3708c), closes #3529
- runtime-core: properly check forwarded slots type (#3781) (e8ddf86), closes #3779
- runtime-core: should not track dynamic children when the user calls a compiled slot inside template expression (#3554) (2010607), closes #3548 #3569
- runtime-core/teleport: ensure the nested teleport can be unmounted correctly (#3629) (4e3f82f), closes #3623
- scheduler: handle preFlush cb queued inside postFlush cb (b57e995), closes #3806
- ssr: handle hydrated async component unmounted before resolve (b46a4dc), closes #3787
- watch: should not leak this context to setup watch getters ([1526f94](https://gi...
v3.1.0-beta.7
Please refer to CHANGELOG.md for details.
v3.1.0-beta.6
Please refer to CHANGELOG.md for details.
v3.1.0-beta.5
Please refer to CHANGELOG.md for details.
v3.1.0-beta.4
Please refer to CHANGELOG.md for details.
v3.1.0-beta.3
Please refer to CHANGELOG.md for details.
v3.1.0-beta.2
Please refer to CHANGELOG.md for details.
v3.1.0-beta.1
Please refer to CHANGELOG.md for details.
v3.0.11
Please refer to CHANGELOG.md for details.
v3.0.10
Please refer to CHANGELOG.md for details.