-
-
Notifications
You must be signed in to change notification settings - Fork 522
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
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.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.ts
a thing (and thus generate type safe configurations).This also splits our
ForgeConfig
type into two typesForgeConfig
andResolvedForgeConfig
.ForgeConfig
is the partial config definition that a user providesResolvedForgeConfig
is the full config that is passed around internally and populated with defaultsThis was done so that
ForgeConfig
could be used by apps for their config files. E.g.