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

[zero] Migrate to use wyw-in-js instead of linaria #40866

Merged
merged 2 commits into from
Feb 7, 2024

Conversation

brijeshb42
Copy link
Contributor

@brijeshb42 brijeshb42 added the package: pigment-css Specific to @pigment-css/* label Jan 31, 2024
@brijeshb42 brijeshb42 force-pushed the zero-wyw branch 3 times, most recently from 3004054 to f25000a Compare January 31, 2024 07:09
@mui-bot
Copy link

mui-bot commented Jan 31, 2024

Netlify deploy preview

https://deploy-preview-40866--material-ui.netlify.app/

@material-ui/core: parsed: +Infinity% , gzip: +Infinity%
@material-ui/lab: parsed: +Infinity% , gzip: +Infinity%
@material-ui/styles: parsed: +Infinity% , gzip: +Infinity%
@material-ui/private-theming: parsed: +Infinity% , gzip: +Infinity%
@material-ui/system: parsed: +Infinity% , gzip: +Infinity%
@material-ui/unstyled: parsed: +Infinity% , gzip: +Infinity%
@material-ui/utils: parsed: +Infinity% , gzip: +Infinity%
@mui/material-next: parsed: +Infinity% , gzip: +Infinity%
@mui/joy: parsed: +Infinity% , gzip: +Infinity%

Bundle size report

Details of bundle changes (Toolpad)
Details of bundle changes

Generated by 🚫 dangerJS against fd72ee4

@@ -3,7 +3,7 @@ import type { NextConfig } from 'next';
import { findPagesDir } from 'next/dist/lib/find-pages-dir';
import {
webpack as zeroWebpackPlugin,
PluginOptions as BaseZeroPluginConfig,
type PluginOptions as BaseZeroPluginConfig,
Copy link
Member

@siriwatknp siriwatknp Jan 31, 2024

Choose a reason for hiding this comment

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

I agree with using explicit type, we should mention this in the core meeting to set the consistency.

Copy link
Member

@oliviertassinari oliviertassinari Feb 7, 2024

Choose a reason for hiding this comment

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

But we can't do this with the current version of TypeScript supported https://mui.com/material-ui/getting-started/supported-platforms/#typescript, e.g. #38296.

I believe we need to change this import. I don't even know if #40996 would be enough.

Suggested change
type PluginOptions as BaseZeroPluginConfig,
import type { PluginOptions as BaseZeroPluginConfig } from '@mui/zero-unplugin';

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I believe we can write this in our source code but it should not end up in the generated d.ts files. This is exactly what is happening right now. If you look at the output, it's like this -

import { PluginOptions } from '@mui/zero-unplugin';

type ZeroPluginConfig = PluginOptions & {
    asyncResolve?: (what: string) => string | null;
};

So there is no type import here.

@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Jan 31, 2024
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Jan 31, 2024
@brijeshb42 brijeshb42 force-pushed the zero-wyw branch 2 times, most recently from 56f2b98 to 47dfc2b Compare February 2, 2024 10:51
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Feb 5, 2024
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Feb 6, 2024
@brijeshb42 brijeshb42 force-pushed the zero-wyw branch 2 times, most recently from eec4e24 to 8141ad3 Compare February 6, 2024 12:32
@github-actions github-actions bot added PR: out-of-date The pull request has merge conflicts and can't be merged labels Feb 6, 2024
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Feb 7, 2024
@brijeshb42 brijeshb42 force-pushed the zero-wyw branch 2 times, most recently from 71b1085 to f868db9 Compare February 7, 2024 06:20
Copy link
Member

@siriwatknp siriwatknp left a comment

Choose a reason for hiding this comment

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

👍

@brijeshb42 brijeshb42 merged commit 2321cf6 into mui:master Feb 7, 2024
19 checks passed
@brijeshb42 brijeshb42 deleted the zero-wyw branch February 7, 2024 08:57
@oliviertassinari oliviertassinari added the package: system Specific to @mui/system label Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: pigment-css Specific to @pigment-css/* package: system Specific to @mui/system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants