Skip to content

Commit 3f7fb4f

Browse files
authored
feat!: bump fork-ts-checker-webpack-plugin version to v5 (#5941)
1 parent 1a0d4df commit 3f7fb4f

File tree

3 files changed

+18
-33
lines changed

3 files changed

+18
-33
lines changed

docs/migrations/migrate-from-v4.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,9 @@ If you want to migrate manually and gradually, you can run `vue upgrade <the-plu
4646

4747
### TypeScript Plugin
4848

49-
#### Dropped TSLint support
50-
51-
As [TSLint has been deprecated](https://github.com/palantir/tslint/issues/4534), we [removed](https://github.com/vuejs/vue-cli/pull/5065) all TSLint-related code in this version.
49+
* Dropped TSLint support. As [TSLint has been deprecated](https://github.com/palantir/tslint/issues/4534), we [removed](https://github.com/vuejs/vue-cli/pull/5065) all TSLint-related code in this version.
5250
Please consider switching to ESLint. You can check out [`tslint-to-eslint-config`](https://github.com/typescript-eslint/tslint-to-eslint-config) for a mostly automatic migration experience.
51+
* Updated `fork-ts-checker-webpack-plugin` from v3.x to v5.x, you can see the detailed breaking changes at <https://github.com/TypeStrong/fork-ts-checker-webpack-plugin/releases/tag/v4.0.0> and <https://github.com/TypeStrong/fork-ts-checker-webpack-plugin/releases/tag/v5.0.0>
5352

5453
### E2E-Cypress Plugin
5554

packages/@vue/cli-plugin-typescript/index.js

+15-26
Original file line numberDiff line numberDiff line change
@@ -82,34 +82,23 @@ module.exports = (api, projectOptions) => {
8282
// this plugin does not play well with jest + cypress setup (tsPluginE2e.spec.js) somehow
8383
// so temporarily disabled for vue-cli tests
8484
if (!process.env.VUE_CLI_TEST) {
85-
if (isVue3) {
86-
config
87-
.plugin('fork-ts-checker')
88-
.use(require('fork-ts-checker-webpack-plugin-v5'), [{
89-
typescript: {
90-
extensions: {
91-
vue: {
92-
enabled: true,
93-
compiler: '@vue/compiler-sfc'
94-
}
95-
},
96-
diagnosticOptions: {
97-
semantic: true,
98-
// https://github.com/TypeStrong/ts-loader#happypackmode
99-
syntactic: useThreads
85+
config
86+
.plugin('fork-ts-checker')
87+
.use(require('fork-ts-checker-webpack-plugin'), [{
88+
typescript: {
89+
extensions: {
90+
vue: {
91+
enabled: true,
92+
compiler: isVue3 ? '@vue/compiler-sfc' : 'vue-template-compiler'
10093
}
94+
},
95+
diagnosticOptions: {
96+
semantic: true,
97+
// https://github.com/TypeStrong/ts-loader#happypackmode
98+
syntactic: useThreads
10199
}
102-
}])
103-
} else {
104-
config
105-
.plugin('fork-ts-checker')
106-
.use(require('fork-ts-checker-webpack-plugin'), [{
107-
vue: { enabled: true, compiler: 'vue-template-compiler' },
108-
formatter: 'codeframe',
109-
// https://github.com/TypeStrong/ts-loader#happypackmode-boolean-defaultfalse
110-
checkSyntacticErrors: useThreads
111-
}])
112-
}
100+
}
101+
}])
113102
}
114103
})
115104
}

packages/@vue/cli-plugin-typescript/package.json

+1-4
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,13 @@
2626
"@types/webpack-env": "^1.15.2",
2727
"@vue/cli-shared-utils": "^4.5.7",
2828
"cache-loader": "^4.1.0",
29-
"fork-ts-checker-webpack-plugin": "^3.1.1",
29+
"fork-ts-checker-webpack-plugin": "^5.0.11",
3030
"globby": "^9.2.0",
3131
"thread-loader": "^2.1.3",
3232
"ts-loader": "^6.2.2",
3333
"webpack": "^4.0.0",
3434
"yorkie": "^2.0.0"
3535
},
36-
"optionalDependencies": {
37-
"fork-ts-checker-webpack-plugin-v5": "npm:fork-ts-checker-webpack-plugin@^5.0.11"
38-
},
3936
"peerDependencies": {
4037
"@vue/cli-service": "^3.0.0 || ^4.0.0-0",
4138
"@vue/compiler-sfc": "^3.0.0-beta.14",

0 commit comments

Comments
 (0)