Fix: alias error while running storybook#142
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
| webpackFinal: async (config) => { | ||
| config.resolve.alias = { | ||
| ...config.resolve.alias, | ||
| '~': path.resolve(__dirname, '../app'), |
There was a problem hiding this comment.
Nit pick:
There is a general practise of using @ instead of ~ for path alias.
There was a problem hiding this comment.
@samyakshah3008 Has this been considered as well?
There was a problem hiding this comment.
If we use @ then we need to change it everywhere in our codebase where we have used ~
Shall I do it in this PR? @harshith-venkatesh @iRohitGaur ? Your thoughts?
There was a problem hiding this comment.
It will be a one-time Change I feel should not be a problem.
There was a problem hiding this comment.
Please consider it as it is application level change
There was a problem hiding this comment.
Great in that case, please go ahead and create a ticket linking this PR as well and mention the expectations of that ticket.
We can assign the ticket to the beginner as well :)
There was a problem hiding this comment.
True, but that also means all the files of story book in the application might be affected right. Might there be a chance, due to this condition, few components might not work right in story book?
Disagree here, if the paths are set right there will not be any problem as I have done this before.
There was a problem hiding this comment.
I guess I got confused with the intent of the ticket and its impact which had led to this discussion.
Thanks for providing more clarity @yesyash @samyakshah3008
There was a problem hiding this comment.
Sounds great, I have raised a ticket #143 @harshith-venkatesh @yesyash 😄
Thanks @yesyash for bringing out this discussion!
harshith-venkatesh
left a comment
There was a problem hiding this comment.
Please address the comment of yash, rest looks good.
| webpackFinal: async (config) => { | ||
| config.resolve.alias = { | ||
| ...config.resolve.alias, | ||
| '~': path.resolve(__dirname, '../app'), |
There was a problem hiding this comment.
@samyakshah3008 Has this been considered as well?
|
Great work with this PR @samyakshah3008 , please ensure the issue is created and mention about this PR as well. |
What is the change?
While running a storybook, server was not started with error message of "ModuleNotFoundError" as we have not configured path Alias in Storybook. In this PR, I have configured Storybook to resolve path alias.
This PR closes issue ticket #138
Before Change Screenshots
After Change Screenshots