Skip to content
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

[pigment-css] Make @pigment-css/react as peer dependency #44498

Merged
merged 2 commits into from
Nov 22, 2024

Conversation

brijeshb42
Copy link
Contributor

@brijeshb42 brijeshb42 commented Nov 21, 2024

This change helps in module resolution across different package
managers, especially pnpm, which expects the imports to be from direct
dependencies.
During sx prop transform, pigment-css plugin adds -

import { sx } from '@pigment-css/react';

which would throw an error when using pnpm since @pigment-css/react was
not a direct dependency of the user's application.

Note: This is a breaking change.

@brijeshb42 brijeshb42 added the examples Relating to /examples label Nov 21, 2024
This change helps in module resolution across different package
managers, especially pnpm, which expects the imports to be from direct
dependencies.
During sx prop transform, pigment-css plugin adds -

```js
import { sx } from '@pigment-css/react';
```

which would throw an error when using pnpm since @pigment-css/react was
not a direct dependency of the user's application.
@brijeshb42 brijeshb42 changed the title [examples] Fix Pigment CSS with Vite [pigment-css] Make @pigment-css/react as peer dependency Nov 22, 2024
@brijeshb42 brijeshb42 added package: pigment-css Specific to @pigment-css/* package: material-pigment-css Specific to @mui/material-pigment-css and removed examples Relating to /examples package: pigment-css Specific to @pigment-css/* labels Nov 22, 2024
@mui-bot
Copy link

mui-bot commented Nov 22, 2024

@brijeshb42 brijeshb42 merged commit 5cb317b into mui:master Nov 22, 2024
23 checks passed
@brijeshb42 brijeshb42 deleted the fix-pigment-vite-example branch November 22, 2024 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change package: material-pigment-css Specific to @mui/material-pigment-css
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants