Skip to content

feat: support TS in templates for @vue/vue3-jest #394

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

Merged
merged 1 commit into from
Oct 7, 2021

Conversation

cexbrayat
Copy link
Member

Vue 3.2.13 introduced the support of TS expressions in templates, with a new isTs option of the compiler.
(See the relevant commit)

vue-loader and vite chose to enable this by default if the script uses TS:

This commit enables the same behavior in vue-jest: if the script is using TS, then the isTs option is passed to the compiler.
TS developers won't have to worry about setting the options themselves, making it coherent with what vue-loader and vite do.

Vue 3.2.13 introduced the support of TS expressions in templates, with a new `isTs` option of the compiler.
(See [the relevant commit](vuejs/core@0dc521b))

vue-loader and vite chose to enable this by default if the script uses TS:
- [vue-loader](vuejs/vue-loader@7613534)
- [vite](vitejs/vite@01fa2ab)

This commit enables the same behavior in vue-jest: if the script is using TS, then the `isTs` option is passed to the compiler.
TS developers won't have to worry about setting the options themselves, making it coherent with what vue-loader and vite do.
@cexbrayat cexbrayat requested a review from lmiller1990 October 1, 2021 07:49
Copy link
Member

@lmiller1990 lmiller1990 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, cool. Vue and TS is getting good.

Can release on the weekend!

@lmiller1990 lmiller1990 merged commit 04a3233 into vuejs:master Oct 7, 2021
@cexbrayat cexbrayat deleted the feat/ts-in-templates branch October 7, 2021 07:22
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.

2 participants