[Vuejs]-What is the best solution to build a vue3 + ts + vite project

0👍

For component code style, vue 3 recommend to use defineComponent + composition api + template(or tsx)

<template>
  <p class="msg">{{ msg }}</p>
</template>

<script lang="ts">
import { defineComponent } from 'vue'

export default defineComponent({
  setup () {
    const msg = 'Hello World!';

    return {
      msg
    }
  }
})
</script>

<style scoped lang="scss" >

</style>

Leave a comment