-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
Conversation
brijeshb42
commented
Jan 31, 2024
- I have followed (at least) the PR section of the contributing guide.
3004054
to
f25000a
Compare
Netlify deploy previewhttps://deploy-preview-40866--material-ui.netlify.app/ @material-ui/core: parsed: +Infinity% , gzip: +Infinity% Bundle size reportDetails of bundle changes (Toolpad) |
@@ -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, |
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 agree with using explicit type
, we should mention this in the core meeting to set the consistency.
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.
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.
type PluginOptions as BaseZeroPluginConfig, | |
import type { PluginOptions as BaseZeroPluginConfig } from '@mui/zero-unplugin'; |
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 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.
56f2b98
to
47dfc2b
Compare
eec4e24
to
8141ad3
Compare
71b1085
to
f868db9
Compare
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.
👍