Type hint error in defineConfig function #856
Closed
quanquan2100
started this conversation in
General
Replies: 1 comment
-
Nice catch! We should handle the default value of:
And the Are you interested in contributing a PR? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When I use the
defineConfig
for configuration, theoutput.target
shows a default value of "web". However, this doesn't match the actual situation, where the default is "node". This misleads my configuration.After checking the official documentation rslib-outputtarget, I found that the description there is correct.
Cause:
Upon further investigation, I discovered that
RslibConfig
directly extends Rsbuild'sRsbuildConfig
interface, but internally,createConstantRsbuildConfig
resets some default values.Proposed Solution:
Considering maintenance costs, I've thought of a solution: using the
@override
decorator to identify fields inherited from Rsbuild and override their default values.I'm not sure if there's a better approach, but I hope this issue can be resolved.
Beta Was this translation helpful? Give feedback.
All reactions