Skip to content

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions apps/site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,7 @@
"next": "15.3.1",
"next-intl": "~4.1.0",
"next-themes": "~0.4.6",
"postcss": "~8.5.3",
Copy link
Member

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

Copy link
Member Author

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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They both recommended to install postcss so I'm not sure if it's good idea.

Copy link
Member Author

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.

Copy link
Member

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

Copy link
Member

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

Copy link
Member Author

@avivkeller avivkeller May 10, 2025

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)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know it is a transitive dependency, but since we import on our code the postcss-loader, even if just on Storybook, then at least it must be on devDependencies for the package that contains storybook.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Im fine keping postcss out as we don't load it)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"postcss-calc": "~10.1.1",
"postcss-loader": "~8.1.1",
"react": "^19.1.0",
"react-dom": "^19.1.0",
"reading-time": "~1.5.0",
Expand Down
15 changes: 5 additions & 10 deletions packages/ui-components/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
import { createRequire } from 'node:module';

import type { StorybookConfig } from '@storybook/react-webpack5';

const require = createRequire(import.meta.url);

const config: StorybookConfig = {
stories: ['../**/*.stories.tsx'],
logLevel: 'error',
Expand All @@ -28,13 +24,12 @@ const config: StorybookConfig = {
'style-loader',
{
loader: 'css-loader',
options: { importLoaders: 1 },
},
{
// Gets options from `postcss.config.js` in your project root
loader: 'postcss-loader',
options: { implementation: require.resolve('postcss') },
options: {
esModule: false,
importLoaders: 1,
},
},
'postcss-loader',
],
},
],
Expand Down
2 changes: 1 addition & 1 deletion packages/ui-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"@types/node": "22.15.3",
"@types/react": "^19.1.0",
"cross-env": "^7.0.3",
"css-loader": "~6.11.0",
"css-loader": "~7.1.2",
"eslint-plugin-react": "~7.37.4",
"eslint-plugin-storybook": "~0.12.0",
"global-jsdom": "^26.0.0",
Expand Down
88 changes: 27 additions & 61 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading