presets
presets copied to clipboard
CRA-Preset won't work with import as * anymore
Hello,
we are using the preset for create-react-app for a while now but since we have updated our react version to the latest stable version we always get an error for components imported as *.
Error-Message:
Cannot read property 'PartialComponent' of undefined
While the import/export looks as following
import { ComponentName } from './ComponentName';
import * as StyledComponentName from './ComponentName.style';
export { ComponentName, StyledComponentName };
The component inside './ComponentName' is a regular React.FC, nothing spectacular. And the contents of the file './ContentName.style' are regular emotion styled components.
If we use your preset the storybook builds correctly without any warnings or errors but if you open it up in your browser it crashes and gives you the error mentioned above. If we remove the preset everything works fine with the built-in preset which will be removed with storybook 6.0.
Would appreciate it if you could help us out here.