feat: add support for forge.config.ts et. al#2993
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2993 +/- ##
=======================================
Coverage 74.19% 74.19%
=======================================
Files 67 67
Lines 2178 2178
Branches 436 436
=======================================
Hits 1616 1616
Misses 355 355
Partials 207 207 Continue to review full report at Codecov.
|
VerteDinde
left a comment
There was a problem hiding this comment.
Since we've been working on docs, would it be helpful to also have an example of a forge.config.ts that users could reference? That might be nice to create while it's top of mind
My plan was to do that and change the webpack-typescript template to use |
8d83840 to
e127433
Compare
This brings in rechoir and interpret which allow arbitrary extensions / loaders for our forge config. Notably this allows us to make forge.config.ts a thing (and thus generate type safe configurations).
e127433 to
cc9df7f
Compare
|
FYI, this was actually a thing in my project even before it made it there. You might find that interesting as an example how I did that previously (and how it was possible to do so) and probably continue doing that. I had to patch some internal types through, to get more accurate types when comparing it with Electron Forge documentation. |
This brings in rechoir and interpret which allow arbitrary extensions / loaders for our forge config.
Notably this allows us to make
forge.config.tsa thing (and thus generate type safe configurations).This also splits our
ForgeConfigtype into two typesForgeConfigandResolvedForgeConfig.ForgeConfigis the partial config definition that a user providesResolvedForgeConfigis the full config that is passed around internally and populated with defaultsThis was done so that
ForgeConfigcould be used by apps for their config files. E.g.