You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit drops support for Vue.js in the plugin. For the last few
years, support for Vue.js has been broken, and the implementation of
Vue.js support was a hacky work-around. Unfortunately, TypeScript
doesn't expose an API to do that properly, and while I created a feature
proposal API on the TypeScript repository, the TypeScript team has other
priorities. As I won't have time to support this feature and am
receiving justified bug reports, I believe it's better to make it clear
that Vue.js is not supported by the plugin instead of pretending that it
is.
BREAKING CHANGE: 🧨 Drop support for Vue.js
Copy file name to clipboardExpand all lines: README.md
+1-126
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,6 @@
19
19
20
20
* Speeds up [TypeScript](https://github.com/Microsoft/TypeScript) type checking (by moving it to a separate process) 🏎
21
21
* Supports modern TypeScript features like [project references](https://www.typescriptlang.org/docs/handbook/project-references.html) and [incremental mode](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-4.html#faster-subsequent-builds-with-the---incremental-flag) ✨
22
-
* Supports [Vue Single File Component](https://vuejs.org/v2/guide/single-file-components.html) ✅
23
22
* Displays nice error messages with the [code frame](https://babeljs.io/docs/en/next/babel-code-frame.html) formatter 🌈
* If you depend on **TypeScript 2.1 - 2.6.2**, please use [version 4](https://github.com/TypeStrong/fork-ts-checker-webpack-plugin/tree/v4.1.4) of the plugin.
30
29
* If you depend on **Webpack 4**, **TypeScript 2.7 - 3.5.3** or **ESLint** feature, please use [version 6](https://github.com/TypeStrong/fork-ts-checker-webpack-plugin/tree/v6.2.6) of the plugin.
30
+
* If you need Vue.js support, please use [version 6](https://github.com/TypeStrong/fork-ts-checker-webpack-plugin/tree/v6.5.2) of ths plugin
31
31
32
32
```sh
33
33
# with npm
@@ -115,20 +115,9 @@ Options for the TypeScript checker (`typescript` option object).
115
115
|`build`|`boolean`|`false`| The equivalent of the `--build` flag for the `tsc` command. |
116
116
|`mode`|`'readonly'` or `'write-dts'` or `'write-tsbuildinfo'` or `'write-references'`|`build === true ? 'write-tsbuildinfo' ? 'readonly'`| Use `readonly` if you don't want to write anything on the disk, `write-dts` to write only `.d.ts` files, `write-tsbuildinfo` to write only `.tsbuildinfo` files, `write-references` to write both `.js` and `.d.ts` files of project references (last 2 modes requires `build: true`). |
117
117
|`diagnosticOptions`|`object`|`{ syntactic: false, semantic: true, declaration: false, global: false }`| Settings to select which diagnostics do we want to perform. |
118
-
|`extensions`|`object`|`{}`| See [TypeScript extensions options](#typescript-extensions-options). |
119
118
|`profile`|`boolean`|`false`| Measures and prints timings related to the TypeScript performance. |
120
119
|`typescriptPath`|`string`|`require.resolve('typescript')`| If supplied this is a custom path where TypeScript can be found. |
121
120
122
-
#### TypeScript extensions options
123
-
124
-
Options for the TypeScript checker extensions (`typescript.extensions` option object).
|`vue`|`object` or `boolean`|`false`| If `true`, it enables Vue [Single File Component](https://vuejs.org/v2/guide/single-file-components.html) support. |
129
-
|`vue.enabled`|`boolean`|`false`| Same as the `vue` option |
130
-
|`vue.compiler`|`string`|`'vue-template-compiler'`| The package name of the compiler that will be used to parse `.vue` files. You can use `'nativescript-vue-template-compiler'` if you use [nativescript-vue](https://github.com/nativescript-vue/nativescript-vue)|
131
-
132
121
### Issues options
133
122
134
123
Options for the issues filtering (`issue` option object).
@@ -176,120 +165,6 @@ module.exports = {
176
165
177
166
</details>
178
167
179
-
## Vue.js
180
-
181
-
⚠️ There are additional **constraints** regarding Vue.js Single File Component support: ⚠️
182
-
* It requires **TypeScript >= 3.8.0** (it's a limitation of the `transpileOnly` mode from `ts-loader`)
183
-
* It doesn't work with the `build` mode (project references)
184
-
185
-
To enable Vue.js support, follow these steps:
186
-
187
-
<details>
188
-
<summary>Expand Vue.js set up instruction</summary>
189
-
190
-
1. Ensure you have all required packages installed:
// add transpileOnly option if you use ts-loader < 9.3.0
252
-
// transpileOnly: true
253
-
}
254
-
},
255
-
{
256
-
test:/\.css$/,
257
-
loader:'css-loader'
258
-
},
259
-
],
260
-
},
261
-
resolve: {
262
-
extensions: ['.ts', '.js', '.vue', '.json'],
263
-
alias: {
264
-
'@':path.resolve(__dirname, './src'),
265
-
'~':path.resolve(__dirname, './src'),
266
-
}
267
-
},
268
-
plugins: [
269
-
newVueLoaderPlugin(),
270
-
newForkTsCheckerWebpackPlugin({
271
-
typescript: {
272
-
extensions: {
273
-
vue:true
274
-
}
275
-
}
276
-
})
277
-
]
278
-
};
279
-
```
280
-
281
-
4. Add `src/types/vue.d.ts` file to shim `.vue` modules:
282
-
```typescript
283
-
declaremodule"*.vue" {
284
-
importVuefrom"vue";
285
-
exportdefaultVue;
286
-
}
287
-
```
288
-
289
-
5. If you are working in VSCode, you can get the [Vetur](https://marketplace.visualstudio.com/items?itemName=octref.vetur) extension to complete the developer workflow.
0 commit comments