TypeStrong / fork-ts-checker-webpack-plugin

Webpack plugin that runs typescript type checker on a separate process.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Vue file check works in dev server but not in build

petternordholm opened this issue · comments

Current behavior

When running webpack in watch-mode / dev server, the vue files are checked and errors are properly reported to console. But when running a full production build, the build passes and no errors are reported even though the *.vue files contains errors.

Pure typescript files works as expected. Root file is a vanilla typescript file including the app.vue file.

Errors are correctly reported in 6.5.1 but when upgraded to 7.0.0, it stops working for production builds.

Expected behavior

Same errors in vue files shall be reported during production build as reported when running in dev server / watch mode. The build shall fail.

Steps to reproduce the issue

Introduce an error in a vue 2 SFC with script type="ts" and run a production build.

Issue reproduction repository

Environment

  • fork-ts-checker-webpack-plugin: 7.0.0 - 7.2.13
  • typescript: 4.6.4
  • eslint: 8.15.0
  • webpack: 5.72.1
  • os: Ubuntu 18.04

According to the docs here, this is known: https://github.com/TypeStrong/fork-ts-checker-webpack-plugin#vuejs

image

The question is, is there any plan for this to be fixed? Is it just impossible to fix?
As it stands, this is the major block we're encountering to use this package. I'd even be willing to use --watch instead if I could kill it after a single build due to the gains in build speed.

What's the intended workflow for this package with vue? Are you meant to run webpack --watch --mode=production once on release day?

What's the official position on whether this is a bug or not? I see that according to Moghul's comment above this is the documented behaviour, but this issue still has the bug label.
Personally, I find this behaviour very surprising (and not very useful).

We are not using project references in our configuration, i.e. not using "build" mode.

The Vue.js support is broken. I decided to drop support for Vue.js to manage expectations (you can still use older versions of the plugin). There is no plan to fix this issue, as supporting Vue.js is really hard (due to hacky TypeScript patching), and I can't afford spending that much time on this project :)

@piotr-oles So the documentation needs updating then? Because I am not using build mode (or project references) either, unless that bit means something that I am missing.

Yes, the documentation needs update - I will do that in the PR that remove the support

I updated README.md, closing this issue as I will not work on fixes for Vue.js :/ Of course, feel free to fork v6 or v7 branch and work on a fixed version of Vue.js integration :)