-
Notifications
You must be signed in to change notification settings - Fork 5
Move from Yarn to NPM #13
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
Conversation
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.
Thank you! Can we add an ADR for this? There wasn't one for Yarn, which made me uncertain of the original reasoning. It'd be good to document our reasoning for NPM in case a future team wants to switch to Yarn 😅
Added! First time writing one of these so any feedback welcome. Wasn't sure if we were supposed to autogenerate the new file or something, but I just did it manually after reading the MADR docs |
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.
I tested locally and successfully ran both Storybook and Next.js (including within Docker) 👍🏻
Co-authored-by: Sawyer Hollenshead <[email protected]>
Co-authored-by: Sawyer Hollenshead <[email protected]>
Co-authored-by: Sawyer Hollenshead <[email protected]>
Co-authored-by: Sawyer Hollenshead <[email protected]>
Co-authored-by: Sawyer Hollenshead <[email protected]>
Co-authored-by: Sawyer Hollenshead <[email protected]>
Ticket
#11
Changes
Context for reviewers
The most interesting change is in the storybook
main.js
file. Magical line is {loader: 'css-loader', "options": {url: false}}, which disables url resolution. We need this b/c with the dependencies in this repo we're installing a higher version and we need to account for a breaking change from css-loader 4.0.0 around url resolution (link to changelog). This approach mirrors what next.js is doing (link) which explains why the main app was building previously but not storybook. Last piece of context, the reason this was working w/ yarn was b/c the css-loader version was for some reason a lower version.Testing
Yay:
