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

Vue file check works in dev server but not in build #778

Closed
petternordholm opened this issue Sep 20, 2022 · 7 comments
Closed

Vue file check works in dev server but not in build #778

petternordholm opened this issue Sep 20, 2022 · 7 comments
Labels

Comments

@petternordholm
Copy link

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
@Moghul
Copy link

Moghul commented Dec 7, 2022

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?

@muster-mark
Copy link

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).

@petternordholm
Copy link
Author

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

@piotr-oles
Copy link
Collaborator

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 :)

@muster-mark
Copy link

@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.

@piotr-oles
Copy link
Collaborator

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

@piotr-oles
Copy link
Collaborator

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants