Thanks to visit codestin.com
Credit goes to github.com

Skip to content

SSR production mode, ref data binding :style loses responsiveness #11372

@raxskle

Description

@raxskle

Vue version

3.4.31

Link to minimal reproduction

https://play.vuejs.org/#__PROD____SSR__eNp9kstuwjAQRX9l5A0g0QCiqzQgtRWLVupDbZeWquAMweDYlu2kVCj/3omjUhYVu3mcO74zyZHdWps0NbKUZV44aQN4DLVdci0ra1yAIxj9ZGodsBiDw1wE2SC0sHGmggFJBzdccy2M9gEsLE7M8Mg1wBZluQ0pDGZTexiMuW5HkT8NHQ5HsFhChG3S4zSFs9mUFJwR3Y64zia9PTJGScDKqjwgZQBZIRsQKvd+wdnakAZSH74VUmo5W2YTAojMJmcySiNDYUKa/v11LvalI1/FlTDKuJSWKToD8f2IszELnpbdyDLZeaPpcFHKmTCVlQrdiw2SjsFZ2g/terlS5usx1oKrkc7Q18UWxf6f+s7TFikFrw49ugY5O/VC7koMfXv1/owHik/NyhS1IvpC8w29UXXnscfuaF2yfcZFtw/x80tdfvjVIaD2v0t1RjuyjTxn9AvcX1j9z+48uY46uidd8bNB182kA1Ijmc9Y+wMS9dkE

Steps to reproduce

In SSR production mode, ref/reactive data binding :style loses responsiveness.

  1. Define a reactive object as the style attribute of the element
  2. then change its value in the onMounted hook, and the style is not updated in a reactive way.

In DEV mode or Not SSR, everything is no problem.

What is expected?

element style updated as the reactive data changed its value

What is actually happening?

element style did not update.
I tried to debug, and find that the targetMap in the source code does not track this effect.

System Info

No response

Any additional comments?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    🔨 p3-minor-bugPriority 3: this fixes a bug, but is an edge case that only affects very specific usage.scope: ssr

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions