-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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][vite] Modify plugin to transform node_modules #39517
Conversation
Netlify deploy previewhttps://deploy-preview-39517--material-ui.netlify.app/ Bundle size report |
@@ -82,16 +76,19 @@ const cssFunctionTransformerPlugin = declare<BabelPluginOptions>((api, pluginOpt | |||
if (themeKey === 'typography' && val === 'inherit') { | |||
return; | |||
} | |||
const propertyThemeKey = themeKey ?? val.split('.')[0]; |
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.
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 tried to fix it but I am not sure where to find.
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'll need to be fixed in styled.ts of zero-runtime package since this function is called at runtime.
Right now it only checks for number/string. It'll need to account for undefined
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.
Fixed in latest commit.
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.
👍
This feature allows users to specify a list of packages that also uses zero runtime and transform the files at build time. Default behavior is not do transform any files from node_modules.
presence in sxConfig. This did not allow you to write callback functions for css variables.
37d4ceb
to
376f47a
Compare
58bf37e
to
3f0e2df
Compare
3f0e2df
to
e346f8f
Compare
This feature allows users to specify a list of packages
that also uses zero runtime and transform the files at
build time. Default behavior is not transform any files
from node_modules.
Also, fix a bug where the transformation did not allow you to write callback functions for css variables.