Changed to check for the existence of .vue files by the embedded source extension #487
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
background
The type information of the
.vue
file written bylang='tsx'
cannot be imported correctly, because there is a bug in the file existence check and it cannot be load.details
Typescript module resolution order is
.ts
,.tsx
,.d.ts
,package.json
...., so the.ts
extension is processed before the.tsx
extension.File existence check as a
.ts
returns true (*1), but the file cannot be loaded correctly because the subsequent check by the embedded source extension is false(*2).Also, the module is considered resolved as a
.ts
, which causes problems with checking jsx statements.*1
fork-ts-checker-webpack-plugin/src/typescript-reporter/extension/TypeScriptEmbeddedExtension.ts
Lines 55 to 57 in 65ab0cc
*2
fork-ts-checker-webpack-plugin/src/typescript-reporter/extension/TypeScriptEmbeddedExtension.ts
Lines 73 to 76 in 65ab0cc
Expected behavior in
*1
is that a check as a.ts
should return false and a check as a.tsx
should return true.Thanks!