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

fix: do not use fork-ts-checker-webpack-plugin for vue-next #5172

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 9 additions & 1 deletion packages/@vue/cli-plugin-typescript/index.js
Expand Up @@ -76,9 +76,17 @@ module.exports = (api, projectOptions) => {
return options
})

if (!process.env.VUE_CLI_TEST) {
let isUsingNextCompiler = true
try {
require('@vue/compiler-sfc')
} catch (e) {
isUsingNextCompiler = false
}
if (!process.env.VUE_CLI_TEST && !isUsingNextCompiler) {
// this plugin does not play well with jest + cypress setup (tsPluginE2e.spec.js) somehow
// so temporarily disabled for vue-cli tests
// it also does not play well with `@vue/compiler-sfc`
// so we also disable it if the project is built with Vue 3
config
.plugin('fork-ts-checker')
.use(require('fork-ts-checker-webpack-plugin'), [{
Expand Down