-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
Closed
Labels
🐞 bugSomething isn't workingSomething isn't workinghas workaroundA workaround has been found to avoid the problemA workaround has been found to avoid the problemscope: sfc-style-varsscope: ssr
Description
Vue version
v3.4.38 / v3.5.0-rc.1
Link to minimal reproduction
Steps to reproduce
Turn on SSR with the following component:
<template>
<div>
reproduction
</div>
</template>
<script setup lang="ts">
defineProps({
cardWidth: {
type: Number,
default: 300,
},
cardHeight: {
type: Number,
default: 500,
},
});
</script>
<style scoped>
div {
border: 1px solid black;
height: v-bind(cardHeight + "px");
width: v-bind(cardWidth + "px");
}
</style>
What is expected?
I expect the same behaviour as client-side rendering, which renders computed CSS vars:
_useCssVars(_ctx => ({
"7ba5bd90-cardHeight\ \+\ \"px\"": (__props.cardHeight + "px"),
"7ba5bd90-cardWidth\ \+\ \"px\"": (__props.cardWidth + "px")
}))
What is actually happening?
A SSR compile error:
SSR compile error: SyntaxError: Error parsing JavaScript expression: Expecting Unicode escape sequence \uXXXX. (2:39)
System Info
No response
Any additional comments?
No response
Metadata
Metadata
Assignees
Labels
🐞 bugSomething isn't workingSomething isn't workinghas workaroundA workaround has been found to avoid the problemA workaround has been found to avoid the problemscope: sfc-style-varsscope: ssr