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

feat(compiler-sfc): Hoist leading comment of defineOptions to export default #9013

Closed
wants to merge 1 commit into from

Conversation

rijenkii
Copy link

@rijenkii rijenkii commented Aug 21, 2023

See also: vue-styleguidist/vue-styleguidist#1399, vuejs/language-tools#1894.

This PR allows to document components made in composition-api style:

<script setup lang="ts">
/**
 * Component documentation comment.
 * @version 12.5.7
 * @beta
 */
defineOptions();
</script>

@github-actions
Copy link

Size Report

Bundles

File Size Gzip Brotli
runtime-dom.global.prod.js 85.8 kB 32.6 kB 29.4 kB
vue.global.prod.js 132 kB 49.3 kB 44.3 kB

Usages

Name Size Gzip Brotli
createApp 47.7 kB 18.9 kB 17.2 kB
createSSRApp 50.5 kB 19.9 kB 18.2 kB
defineCustomElement 50.1 kB 19.6 kB 17.9 kB
overall 61.1 kB 23.7 kB 21.6 kB

@rijenkii
Copy link
Author

rijenkii commented Aug 21, 2023

I have left a message in Discord, will duplicate it here as well because as of now I am a bit stumped.

I've looked at netlify-deployed sfc playground: JS is generated as expected, but TS tooltip does not contain the component documentation:
<script>: https://tinyurl.com/486sk8dm
<script setup>: https://tinyurl.com/4tsytkp5

If anyone knows what is going on please chime in, as I have little clue of what I am actually doing.

@rijenkii rijenkii closed this Aug 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant