Skip to content
This repository has been archived by the owner on Jun 4, 2024. It is now read-only.

Workaround for webpack --watch / fork-ts-checker issues #967

Closed
wants to merge 5 commits into from

Conversation

jtbandes
Copy link
Member

This workaround forces fork-ts-checker to watch file dependencies in our packages dirs. Previously it would not rebuild when certain types-only files were changed (TypeStrong/fork-ts-checker-webpack-plugin#611).

Fixes #893

package.json Outdated Show resolved Hide resolved
@jtbandes jtbandes changed the base branch from main to roman/upgrade-storybook May 15, 2021 02:19
Base automatically changed from roman/upgrade-storybook to main May 15, 2021 02:22
@jtbandes jtbandes force-pushed the jacob/tsconfig-paths-and-includes branch 2 times, most recently from df6f29c to bf1887a Compare May 15, 2021 02:38
There is an issue with fork-ts-checker (or perhaps we are misusing it) such that it does not re-typecheck the correct files when a change is made in the app, most notably for files that only export types. (TypeStrong/fork-ts-checker-webpack-plugin#611)

This change forces it to look at these files in our package source directories rather than the symlinks in node_modules created by yarn workspaces. Now they are correctly watched and new type errors show up when a type-only file is edited.

fix build error

fix yarn.lock

Move base tsconfig changes to desktop tsconfigs
@jtbandes jtbandes force-pushed the jacob/tsconfig-paths-and-includes branch from 77ada42 to 50d3872 Compare May 18, 2021 00:07
@jtbandes jtbandes marked this pull request as ready for review May 18, 2021 00:07

// These includes are added to ensure that fork-ts-checker correctly typechecks changed files:
// https://github.com/TypeStrong/fork-ts-checker-webpack-plugin/issues/611
"../../app/**/*",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should wait on this until we move app into packages

@defunctzombie
Copy link
Contributor

@jtbandes still doing anything with this? Was it ever resolved upstream?

@jtbandes
Copy link
Member Author

I don't think it was resolved upstream – we still experience issues with webpack not updating when types are changed. We've all just become used to restarting the dev server occasionally. I'm not sure this approach is desired so I'll close the PR.

@jtbandes jtbandes closed this Jul 21, 2021
@jtbandes jtbandes deleted the jacob/tsconfig-paths-and-includes branch July 21, 2021 18:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

yarn serve doesn't watch all files
2 participants