Closed wcbell51 closed 3 years ago
hope this helps: right now the only way to get around this is to import defineProps from vue until you all hopefully update the package. thank you in advance!
Is it possible to only enable these globals in <script setup>
?
There is no way to define globals
only in <script setup>
.
You need use import {defineProps, defineEmits} from 'vue'
, if you don't want to add it to globals
in other files.
@ota-meshi Putting this information in the doc at https://v3.vuejs.org/api/sfc-script-setup.html#defineprops-and-defineemits would be very useful. I looked for a while before I got here.
Checklist
Tell us about your environment
Please show your full configuration:
What did you do?
What did you expect to happen? -no errors
What actually happened?
Module Error (from ./node_modules/eslint-loader/index.js):
20:15 error 'defineProps' is not defined no-undef ✖ 1 problem (1 error, 0 warnings)
@ ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader-v16/dist??ref--0-1!./src/views/Scenes.vue?vue&type=script&setup=true&lang=js 3:0-56 21:19-30 @ ./src/views/Scenes.vue?vue&type=script&setup=true&lang=js tup=true&lang=js 3:0-56 21:19-30
@ ./src/views/Scenes.vue @ ./src/router/index.ts @ ./src/main.ts @ multi (webpack)-dev-server/client?http://192.168.86.221:8080&sockPath=/sockjs-node (webpack)/hot/dev-server.js ./src/main.ts
Repository to reproduce this issue
-> cannot submit ~ internal repo with my company
thought I'd leave these here as well~
screen shot from this page in the docs: https://v3.vuejs.org/api/sfc-script-setup.html#using-components
this was a post I made in the Vue Land Discord about the issue
this was a DM I had with someone from the vue core team who referred me to post an issue about this in this repository so here I am :)