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

[Question] How do you can code this template? #23

Closed
harrytran998 opened this issue Dec 18, 2020 · 7 comments
Closed

[Question] How do you can code this template? #23

harrytran998 opened this issue Dec 18, 2020 · 7 comments

Comments

@harrytran998
Copy link
Contributor

Today, I open this template(lastest of repo) --> But have issue with VSCode.

  1. Module have no default export
  2. In template, have no suggestion code.
    image

I researched and found this vuejs/vitepress#137 (comment) --> Evan suggest use Volar, then I try but still not work! I use Vetur 0.31.3 and VsCode lastest.

Hope you can answer this question :v

@antfu
Copy link
Member

antfu commented Dec 18, 2020

I am using Vetur and somehow I don't see the error on my side. But frankly, Vitesse uses a lot of experimental features (include Vite which doesn't have a stable release yet). Which you would potentially face breaking changes and incomplete editor support. I would recommend to hold it for a while if you really care about them.

@harrytran998
Copy link
Contributor Author

Thank you for your quick response! I will try, because this is awesome 🥳! I appreciate your works!

@antfu
Copy link
Member

antfu commented Dec 19, 2020

You may like to have this config

"vetur.validation.interpolation": false,

@harrytran998
Copy link
Contributor Author

This config fixed problem no default export 🥳, but still don't have code suggestion :v

@yankeeinlondon
Copy link

I believe this "no default export" error is a result of using the still experimental <script setup> RFC. If you use the composition api in the standard way this error will go away. That said, this error in the template, is a visual inconvenience but doesn't actually prevent TS from transpiling.

@yankeeinlondon
Copy link

Also be aware of Vetur's globalComponents property. The default setting for it is [] and that is worth sticking to with Vitesse because Vitesse actually registers all components for you and this setting is just meant to "autocomplete" component names within a glob pattern. So setting this actually causes interference. If this last post made no sense then ignore it. :)

@antfu
Copy link
Member

antfu commented Feb 5, 2021

I have switched to Volar for this project which has great support for <script setup>, closing this for now.

@antfu antfu closed this as completed Feb 5, 2021
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

No branches or pull requests

3 participants