Skip to content

fix: fixed lang='tsx' files not working for vue2-jest #395

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 4 commits into from
Oct 8, 2021

Conversation

Yama-Tomo
Copy link
Contributor

Fix lang='tsx' files to be transpiled as tsx.

typescript.transpileModule does not correctly parse JSX syntax when the file extension is not .tsx.

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.

Seems okay, I am unsure about removing the target: 'es5'. If CI is okay, it should be fine, though.

@@ -72,7 +72,7 @@ const getTsJestConfig = function getTsJestConfig(config) {
const configSet = new ConfigSet(config.config)
var tsConfig = configSet.typescript || configSet.parsedTsConfig
return {
compilerOptions: { ...tsConfig.options, target: 'es5', module: 'commonjs' }
compilerOptions: { ...tsConfig.options, module: 'commonjs' }
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if changing the target: 'es5' is going to cause any problems. Let's see if CI passes.

@lmiller1990
Copy link
Member

I can release over this weekend. Thanks!

@lmiller1990 lmiller1990 changed the title fixed lang='tsx' files not working for vue2-jest fix: fixed lang='tsx' files not working for vue2-jest Oct 8, 2021
@lmiller1990 lmiller1990 merged commit c6292f3 into vuejs:master Oct 8, 2021
@cameron-martin
Copy link

Forcing an ES5 target isn't ideal for us so I like this change. Do you know when you'll do a release with this in?

@lmiller1990
Copy link
Member

Sorry, I forgot to release this. I will try do this within 48h, tag or ping me if it isn't done by the start of next week.

lmiller1990 pushed a commit that referenced this pull request Aug 6, 2023
Applies the same fix for Vue 2 with this PR: #395

Resolves #510
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.

3 participants