vuejs / core

đź–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
https://vuejs.org/
MIT License
47.77k stars 8.35k forks source link

<style scoped> doesn't work on SFC components created by render functions #7980

Open dqhieuu opened 1 year ago

dqhieuu commented 1 year ago

Vue version

3.2.47

Link to minimal reproduction

https://codesandbox.io/p/sandbox/prod-sun-sjr86q?file=%2Fsrc%2FApp.vue

Steps to reproduce

  1. Use these packages:

    "vue": "^3.2.47",   
    "vite": "^4.2.1",
    "@vitejs/plugin-vue-jsx": "^3.0.1",
  2. Create a JSX component (or a component created with h()) in a SFC <script setup> and add it to a <template>. Use a <style scoped> in the same file where the JSX component is defined.

What is expected?