fix: add missing @/styles alias to Storybook webpack config - #3272
Open
Mir-Zairan wants to merge 1 commit into
Open
fix: add missing @/styles alias to Storybook webpack config#3272Mir-Zairan wants to merge 1 commit into
Mir-Zairan wants to merge 1 commit into
Conversation
The @/styles path alias was not included in the manually defined aliases in .storybook/main.js. This caused a SassError when Storybook tried to compile components that use `@use '@/styles/constants'` or `@use '@/styles/breakpoints'` in their SCSS modules (e.g. Button, Sorter).
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
@/stylespath alias was missing from the manually defined aliases in.storybook/main.js. This caused aSassError: Can't find stylesheet to importwhen Storybook tried to compile any component whose SCSS module uses@use '@/styles/constants'or@use '@/styles/breakpoints'(e.g.Button,Sorter), making those stories fail to render entirely.The existing comment in the file already acknowledges that
@/aliases must be defined manually in Storybook —@/styleswas simply omitted from the list.Closes: N/A
Type of Change
Scope Confirmation
Rollback Safety
Test Plan
Testing steps:
yarn storybookButtonorSortercomponentsSassError: Can't find stylesheet to importerror appearsEdge Cases Verified
Pre-Review Checklist
Code Quality
Testing & Validation
yarn lint)Accessibility (if UI changes)
N/A — configuration change only
Screenshots/Videos
N/A — no visual changes, this is a Storybook configuration fix
AI Assistance Disclosure