FranckFreiburger / vue3-sfc-loader

Single File Component loader for Vue2 and Vue3. Load .vue files directly from your HTML. No node.js environment, no build step.
MIT License
1.03k stars 116 forks source link

css in jsx not scoped #186

Open mustapha-wang opened 3 months ago

mustapha-wang commented 3 months ago

if use jsx,the scoped css not applied.


<script setup lang="jsx">
  console.log('sfc setup');
  const My=function(){return(
    <>
      <span class='red'>red</span>
      <h1>china,shanghai</h1>
    </>
  )}
</script>

<template>
  <My />
</template>

<style scoped>
  h1{
    font-size: large;
    color:red;
  }
  .red{
    color:red;
  }
</style>
`