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

TS support for importing .vue components within .tsx files #664

Closed
tgriesser opened this issue Nov 4, 2021 · 3 comments
Closed

TS support for importing .vue components within .tsx files #664

tgriesser opened this issue Nov 4, 2021 · 3 comments
Labels
question Further information is requested

Comments

@tgriesser
Copy link

Hello - have been trying my best to search & read up through existing issues but I haven't quite been able to figure this out.

When importing a .vue component in a .tsx file, for instance in what we're doing in our Cypress component testing development workflow, is it possible via configuration or otherwise to get it so that an imported Vue SFC file is picked up as a normal TypeScript component the way that it it when imported from .vue files?

I've tried a few things but haven't quite been able to get this working and first wanted to check if it was even possible, or if it's something I could try patching the typescript-vue-plugin to support.

/cc @JessicaSachs

@johnsoncodehk
Copy link
Member

You can use TS plugin extension or take over mode.

@johnsoncodehk johnsoncodehk added the question Further information is requested label Nov 5, 2021
@JessicaSachs
Copy link

Just tested. This seems to work @tgriesser

@tgriesser
Copy link
Author

Thanks for the info @johnsoncodehk, completely missed take over mode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants