Conversation
So there's an interesting behaviour with this commit: It looks like Storybook simply doesn't support |
Can we create a
...? |
package.json
Outdated
@@ -43,7 +43,6 @@ | |||
"@storybook/addon-options": "^3.4.11", | |||
"@storybook/addon-viewport": "^3.4.11", | |||
"@storybook/react": "4.0.0-alpha.8", | |||
"babel-core": "^7.0.0-bridge.0", |
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.
Just tried locally and this doesn't appear to be needed - perhaps because we have that plugin-transform-modules-commonjs plugin for Jest now 🤔
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.
Nope - wait - after running npm ci
and then npm test
, it fails "cannot find babel-core" so we do need it.
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.
What is the reason for using the alpha of @storybook/react as opposed to something more recent - "^4.0.12"
?
After much investigation, it looks as though the Storybook instance is overwritten by Storybook instances inside node_modules folders under the packages/components/** directory. This is our short-term solution; we intend to raise an issue with Storybook.
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.
Resolves #115
Storybook should work and all components should load in styles. Note: Reith font and normalise setup are not yet added. Those will be added in a separate PR.
Testing instructions
This installs initial dependencies & all individual packages
This runs
clear_styled_components
& then starts storybookVisit http://localhost:8080
There should be no errors, and styles should be pulled in.