-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
chore(deps): update css-loader, remove redundant deps #7739
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
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
Pull Request Overview
This PR updates the version of css-loader to its next major release and removes redundant postcss-related dependencies that are bundled with Next.js.
- Updated css-loader version in packages/ui-components/package.json
- Adjusted Storybook configuration in packages/ui-components/.storybook/main.ts to match the new css-loader settings and removed explicit postcss-loader configuration
- Removed unneeded postcss and postcss-loader entries from apps/site/package.json
Reviewed Changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.
File | Description |
---|---|
packages/ui-components/package.json | Upgraded css-loader dependency to ~7.1.2 |
packages/ui-components/.storybook/main.ts | Updated css-loader options and simplified postcss-loader configuration |
apps/site/package.json | Removed redundant postcss dependencies bundled with Next.js |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (1)
packages/ui-components/.storybook/main.ts:27
- The removal of the custom implementation for 'postcss-loader' (previously using require.resolve('postcss')) means the default configuration will be used. Please confirm that these defaults align with your intended postcss behavior within Storybook.
options: { esModule: false, importLoaders: 1, },
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## main #7739 +/- ##
=======================================
Coverage 74.84% 74.84%
=======================================
Files 98 98
Lines 7888 7888
Branches 200 200
=======================================
Hits 5904 5904
Misses 1983 1983
Partials 1 1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Lighthouse Results
|
@@ -55,9 +55,7 @@ | |||
"next": "15.3.1", | |||
"next-intl": "~4.1.0", | |||
"next-themes": "~0.4.6", | |||
"postcss": "~8.5.3", |
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.
It's strange to remove it because tailwind guide ask 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.
Next.js includes PostCSS bundled with 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.
- https://nextjs.org/docs/app/getting-started/css
- https://tailwindcss.com/docs/installation/framework-guides/nextjs
They both recommended to install postcss so I'm not sure if it's good idea.
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.
Per https://nextjs.org/docs/pages/guides/post-css
Next.js compiles CSS for its built-in CSS support using PostCSS.
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.
Hmmm strange, let's wait for the opinion of other team members
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.
It may vary, the guide that @avivkeller shared is for the Pages Router, but we use both the App Router and the Pages Router, so it's hard to know exactly what should be done. Maybe asking for input from someone on the Next.js team would be a good idea
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.
It's also worth nothing that postcss is a dependency of Next.js itself, regardless of what router is used.
To be honest, I'm not strong one way or another, this doesn't change our dependency count down the line (since postcss is still installed by Next)
Ref: #7725
This PR does two things:
css-loader
to the next majorpostcss
dependencies that are bundled with Next.js, since they do not serve a purpose