-
Notifications
You must be signed in to change notification settings - Fork 424
Revert "Remove duplicate ForkTsCheckerWebpackPlugin for web build" #1152
Conversation
)" This reverts commit 42d8b40.
Thanks for context. If you want to keep this though, I don't think you are intending to have two |
Also, FYI the reason the web build is broken is I think you will need the Separate question - why do we even have |
Well they are checking different TS files. I guess we could explore a single tsconfig that also includes the top level scripts but I'm not sure how easy that is nor if it's actually an improvement in any way.
We do also have |
Why do we only need these now? (Also commented at #1017 (comment)) |
This is the pattern used everywhere else in the repo, so it's less about which way is better and more just consistency. I'll make a PR to demonstrate and we can see if it correctly fails your tests.
We do have those, we don't have a second
Replied over there |
Interesting - it looks like since jest files were converted from ts to json, there are no longer any packages in the repo (other than web) which have both a |
Ok so it has one for jest, but not webpack... if I add some type errors to web/webpack.config.ts and run
I guess I meant that these main/preload/renderer folders are kind of like a Most of our other packages don't have any .ts files at the top level so that's probably why they never wanted/needed a tsconfig at the top level. Looking at the web configs now I remembered one thing that forced us to have two separate tsconfigs: the |
Yeah, you're right. I did some experimentation in #1153, but it looks like it's not easy to tell webpack to use a specific named tsconfig.json without installing yet another module (docs). We did have this exact problem in the past with jest.config.ts files, but it has since become a non issue, and I think jest must have had a different method of finding a relevant tsconfig (actually checking whether it was covered by include paths). Since webpack/ts-node ignores the include paths, it's kinda crazy that they even both respecting the I think the current src/tsconfig.json solution is ok then. |
馃彄 Reverts #1144
This is needed to catch TS errors in files in
web/src/
. By default the ForkTsChecker will look atweb/tsconfig.json
, which is only used for top-level .ts files in the web folder (i.e.web/webpack.config.ts
) but will not typecheck files undersrc
. An example error (with CI green) can be seen in #1151 ... this is the same error that was fixed in #1109 when I added the ForkTsChecker.