Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If you do not export default it in <setup>, the import will report an error #2473

Closed
hairyf opened this issue Nov 16, 2020 · 2 comments
Closed

Comments

@hairyf
Copy link

hairyf commented Nov 16, 2020

HelloWorld.vue

<script setup="props" lang="ts">
import { computed, ref, watchEffect } from 'vue'
declare const props: {
  msg: string
}
export const count = ref(0);
export const computedMsg = computed(()=> props.msg + "!!!!")
watchEffect(()=>{
  console.log(computedMsg.value)
})

export default {}
</script>

App.vue

<script setup lang="ts">
// Module '"./components/HelloWorld.vue"' has no exported member 'default'.Vetur(2305)
export { default as HelloWorld } from './components/HelloWorld.vue';
</script>
@yoyo930021
Copy link
Member

Duplicate of #2296

@yoyo930021 yoyo930021 marked this as a duplicate of #2296 Nov 16, 2020
@yoyo930021
Copy link
Member

yoyo930021 commented Nov 16, 2020

Please don't open new issue.
Follow #2296
No support yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants