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

Need to restart webpack-dev-server to update ts check status after making change to my types in d.ts files? #503

Closed
cbdeveloper opened this issue Aug 24, 2020 · 2 comments
Labels

Comments

@cbdeveloper
Copy link

cbdeveloper commented Aug 24, 2020

Current behavior

When I make changes to my types. Sometimes the plugin will only show/resolve TS errors/warnings after I stop and restart webpack-dev-server.

Expected behavior

The plugin would update the TS errors/warning immediately after type changes.

Steps to reproduce the issue

Don't know exactly how to reproduce, but would like to know if this is normal behavior.

Issue reproduction repository

For example

The plugin is complaining about a IS_MOBILE property that is missing from my LAYOUT type.

image

This is because I was experimenting a new shape for this object.

But you can see that I already removed that property from my LAYOUT interface, so that error should not be showing anymore.

image

Now I'm going to restart webpack:

image

You can see from the image above that the error is now gone.

QUESTION

Is this the normal behavior for the ForkTsCheckerWebpackPlugin? Do I need to restart my webpack-dev-server when I make those kind of changes? Or is it maybe cause because I'm using react-hot-loader or some other config I should be using. Has anyone seen this before?

NOTE: The normal VSCode ts check throughout my opened files is working fine. They always immediately reflect the changes I make to the types I'm using.

PS: Those types are declared in d.ts files using declare namespace {...}

Environment

"fork-ts-checker-webpack-plugin": "^5.0.14",
"webpack": "^4.44.0",
@piotr-oles
Copy link
Collaborator

Duplicate: #36 . It's an old issue, I hope I will be able to solve it soon.

@cbdeveloper
Copy link
Author

Thanks a lot for your reply. Sorry about the duplicate. This package helps me a lot!

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

2 participants