Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore Storybook CSS alias if file doesn't exist #5144

Merged
merged 2 commits into from
Apr 13, 2022

Conversation

jtoar
Copy link
Contributor

@jtoar jtoar commented Apr 13, 2022

Closes #5143.

Many users don't use the web/src/index.css file. If they remove it, it breaks storybook since storybook tries to require it. This PR makes the webpack alias default to false so that webpack doesn't break hard if it's not there. See https://webpack.js.org/configuration/resolve/#resolvealias.

@dac09 one way of testing this is to add two steps to the smoke test workflow. The first one would remove the index.css file and the second would run the storybook smoke test again. Should I go ahead and make those changes to this PR, or does it seem like more overhead than it's worth?

@jtoar jtoar self-assigned this Apr 13, 2022
@netlify
Copy link

netlify bot commented Apr 13, 2022

Deploy Preview for redwoodjs-docs ready!

Name Link
🔨 Latest commit d5f3341
🔍 Latest deploy log https://app.netlify.com/sites/redwoodjs-docs/deploys/6256bac0ebfc2b00090a696f
😎 Deploy Preview https://deploy-preview-5144--redwoodjs-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@jtoar jtoar force-pushed the ds-fix-storybook-css-alias branch from 25b8f36 to 8757313 Compare April 13, 2022 11:17
@jtoar jtoar marked this pull request as ready for review April 13, 2022 11:17
@dac09
Copy link
Contributor

dac09 commented Apr 13, 2022

Yeah Not sure its worth it in the smoke test, as long as you've tested the different permutations, should be fine!

@jtoar jtoar enabled auto-merge (squash) April 13, 2022 11:57
@jtoar jtoar merged commit cef8846 into main Apr 13, 2022
@jtoar jtoar deleted the ds-fix-storybook-css-alias branch April 13, 2022 12:26
@jtoar jtoar added this to the next-release milestone Apr 13, 2022
@thedavidprice thedavidprice modified the milestones: next-release, v1.1.0 Apr 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Status: Archived
Development

Successfully merging this pull request may close these issues.

Storybook breaks if there's no web/src/index.css file
4 participants