unplugin-vue2-script-setup
unplugin-vue2-script-setup copied to clipboard
💡 Bring `<script setup>` to Vue 2.
So with Vue 2.7.0, Vue now includes the Composition API and support. What it doesn't include, however, is support for reactivityTransform. At the moment, using 2.7 with this plugin breaks...
I moved from webpack to ESbuild but I get `ReferenceError: defineProps is not defined` My config is a bit different from the doc : `plugins: [rails(), vuePlugin(), require('unplugin-vue2-script-setup/esbuild').default()],` instead of...
``` // router.ts import Home from '@/view/home/Index.vue'; ``` ``` // view/home/Index.vue import { ref } from '@vue/composition-api'; let count = ref(0); console.log('ready'); const addCount = () => { count.value++ }...
In a vue2 + vite + unplugin-vue2-script-setup project i have a ts error (not eslint) on build that `Cannot find name defineProps/defineEmits` Here's project's tsconfig https://github.com/jacekkarczmarczyk/rachunek/blob/master/tsconfig.json and example usage of...
hi, "unplugin-vue2-script-setup": "^0.10.0", "@vue/composition-api": "^1.4.9", "vue": "^2.6.14", "vue-demi": "^0.7.5", "vue-router": "^3.5.3" "vite": "^2.9.1", "vite-plugin-vue2": "^1.9.3", When using how can I access previous this.$router and this.$route in my component? If i...
I'm using a custom Jest transformer for usage with the Ref Sugar syntax: ``` const { raw } = require('unplugin-vue2-script-setup').default const transform = raw({ reactivityTransform: true }).transform module.exports = {...
这种方式的 v-model:show="show" 值更新不生效 使用组件的页面 ``` ``` 组件页面 ``` import { reactive, watch, ref, computed, toRefs, watchEffect } from '@vue/composition-api'; interface Props { show?: boolean; } const { show } =...
Hi, It seems that when using script setup and naming a variable (either a ref or not) the same name as a tag/component present in a template, this error will...
I can't find it in the `` docs at the moment, but I followed the `script setup` spec pretty closely, and I could have _sworn_ that the `name` field of...
## Overview This plugin seems to intentionally correct variable names in the ref object if they are covered by key names of other objects. example: ```js const listeners = computed(()...