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

Update vue-compiler-sfc-shim.js #5762

Closed
wants to merge 1 commit into from
Closed

Conversation

734364420
Copy link

https://github.com/TypeStrong/fork-ts-checker-webpack-plugin/blob/master/src/typescript-reporter/extension/vue/TypeScriptVueExtension.ts#L36

fork-ts-checker-webpack-plugin-v5中判断是vue 3版本依据的是typeof (compiler as VueTemplateCompilerV3).parse === 'function',而这个文件中的方法是parseComponent,导致fork-ts-checker-webpack-plugin-v5中判断是vue 2版本,无法正确处理vue文件中的ts编译。

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Docs
  • Underlying tools
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

Other information:

https://github.com/TypeStrong/fork-ts-checker-webpack-plugin/blob/master/src/typescript-reporter/extension/vue/TypeScriptVueExtension.ts#L36

fork-ts-checker-webpack-plugin-v5中判断是vue 3版本依据的是`typeof (compiler as VueTemplateCompilerV3).parse === 'function'`,而这个文件中的方法是parseComponent,导致fork-ts-checker-webpack-plugin-v5中判断是vue 2版本,无法正确处理vue文件中的ts编译。
@sodatea
Copy link
Member

sodatea commented Aug 8, 2020

谢谢提醒!没有注意到 fork-ts-checker-webpack-plugin 已经支持 compiler-sfc 了。这样的话,这个 shim 也不需要了,直接把 compiler 配置改为 @vue/compiler-sfc 即可。

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.

None yet

2 participants