fix(builder): returns empty object instead undefined#370
fix(builder): returns empty object instead undefined#370fi3ework merged 1 commit intorstackjs:mainfrom qramilq:fix-react-shims-config-return
Conversation
✅ Deploy Preview for storybook-rsbuild ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
thank you for your contributing, i'm not sure whether |
|
@fi3ework thank's for reviewing. I passed const configObject = {}
const configUndefined = undefined
const {dev, output} = configObject // <- Ok
const {dev, output} = configUndefined // <- ErrorHow I find this: I installed the rslib and chose to also install the storybook during installation. I didn't change code which was generated by installer. When I try to launch the storybook (using npm run storybook), I get an error:
You can try it yourself, just make steps from rslib's guide, just choose react+typescript+storybook |
|
oh. i think it's introduced in web-infra-dev/rsbuild#6369. returning |

The result of function
applyReactShimsis passing to rsbuildReal.mergeRsbuildConfig which then make destruction when trying normalize config structure. Soundefinedcan't be destructed.Maybe we should add condition and not pass result of
applyReactShimstorsbuildReal.mergeRsbuildConfigif it returnsundefinedor we need to add conditions in normalizeConfigStructure?