You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The create-react-app config is loading twice, but should not be.
To Reproduce
Steps to reproduce the behavior:
Run storybook alongside an application based on create-react-app.
Observe terminal output.
Expected behavior
This config should be loaded once only.
Screenshots
System:
OS: Windows 10 - Ubuntu on WSL
Device: Surface Book 2
Browser: N/A
Framework: React
Addons: a11y, actions, knobs, links
Version: 4.1.0-alpha.8
Additional context
I discovered this whilst working on #4902, as I was getting a strange error and then discovered that the config was loading twice. I've worked around this issue on that branch, for now, and commented so that line can be remove when this issue is resolved.
The text was updated successfully, but these errors were encountered:
We are applying presets on baseConfig and defaultConfig independently (it's not an issue introduced only in presets feature, it was also before, but now it's more visible):
The reason for this, is that we don't know what user will choose.
The possible solution could be:
Changing them into funcs:
module.exports=(baseConfig,mode,defaultConfig)=>{constconfig=baseConfig();// let's say the presets will be applyed only upon the invocation.}
☝️ this can be backward compatible with a deprecation message.
Update: ☝️ this is also a breaking change 🤔
Reducing the baseConfig at all (my prefered actually)
The difference between the base and default configs are only a few css/images rules added by default. IMO this is more a historical setup, and we can just use only one. Also, since we are trying to make things work out of the box with the tools like CRA and angular-cli (and more in the future).
Describe the bug
The create-react-app config is loading twice, but should not be.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
This config should be loaded once only.
Screenshots
System:
Additional context
I discovered this whilst working on #4902, as I was getting a strange error and then discovered that the config was loading twice. I've worked around this issue on that branch, for now, and commented so that line can be remove when this issue is resolved.
The text was updated successfully, but these errors were encountered: