<script setup> is a compile-time syntactic sugar for using Composition API inside Single File Components (SFCs) used in VueJS 3.x. I'm trying to get it to work in VueJS 2.x. Composition API is available as a separate module that can be installed in Vue 2.x projects. I installed the package and it compiles and runs, but my bindings do not show anything in the output. Even the simplest ones like:
<script setup>
const msg = 'Hello!'
</script>
<template>
<div>{{ msg }}</div>
</template>
do not show anything on the webpage. Am I missing something or does it not support Vue 2.x projects?
setup script lang="ts"plus much more.