Skip to content

Instantly share code, notes, and snippets.

@yyx990803
Last active December 29, 2023 16:42
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save yyx990803/061593abfbaf1f2e3ddeee9094a6e6bf to your computer and use it in GitHub Desktop.
Save yyx990803/061593abfbaf1f2e3ddeee9094a6e6bf to your computer and use it in GitHub Desktop.
[DRAFT] Vue 3.4 aggregated changelog

[DRAFT] 3.4.0 Aggregated Changelog

This is the aggregated changelog for 3.4 that includes changes landed in all alpha and beta pre-releases. For changelog of individual pre-releases, please check here.

Features

Performance Improvements

  • compiler-sfc: avoid sfc source map unnecessary serialization and parsing (f15d2f6)
  • compiler-sfc: remove magic-string trim on script (e8e3ec6)
  • compiler-sfc: use faster source map addMapping (50cde7c)
  • compiler-core: optimize away isBuiltInType (66c0ed0)
  • compiler-core: optimize position cloning (2073236)
  • codegen: optimize line / column calculation during codegen (3be53d9)
  • codegen: optimize source map generation (c11002f)
  • shared: optimize makeMap (ae6fba9)

BREAKING CHANGES

Global JSX Registration Removed

Starting in 3.4, Vue no longer registers the global JSX namespace by default. This is necessary to avoid global namespace collision with React so that TSX of both libs can co-exist in the same project. This should not affect SFC-only users with latest version of Volar.

If you are using TSX, there are two options:

  1. Explicitly set jsxImportSource to 'vue' in tsconfig.json before upgrading to 3.4. You can also opt-in per file by adding a /* @jsxImportSource vue */ comment at the top of the file.

  2. If you have code that depends on the presence of the global JSX namespace, e.g. usage of types like JSX.Element etc., you can retain the exact pre-3.4 global behavior by explicitly referencing vue/jsx, which registers the global JSX namespace.

Note that this is a type-only breaking change in a minor release, which adheres to our release policy.

Deprecated Features Removed

  • Reactivity Transform was marked deprecated in 3.3 and is now removed in 3.4. This change does not require a major due to the feature being experimental. Users who wish to continue using the feature can do so via the external plugin at https://vue-macros.dev/features/reactivity-transform.html
  • app.config.unwrapInjectedRef has been removed. It was deprecated and enabled by default in 3.3. In 3.4 it is no longer possible to disable this behavior.
  • @vnodeXXX event listeners in templates are now a compiler error instead of a deprecation warning. Use @vue:XXX listeners instead.
  • v-is directive has been removed. It was deprecated in 3.3.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment