Closed nate-summercook closed 2 years ago
I can also create a pull request if that helps :)
I can also create a pull request if that helps :)
Thank you @nate-summercook. Contributions are always appritiated. I'm looping in @flaviendelangle as there may be complications based on the package you would like to contribute to as not all of them are MIT.
Here's a related issue (follow-up of this one): https://github.com/mui/material-ui/issues/32620
Thanks for the support :)
Your welcome It should be released next week :+1:
Cool, is someone looking at the related PR? :)
Not yet no
so until this is added @flaviendelangle we would need to add babel/runtime as a peer dep?
Also, a little off topic but is there any intention to move towards SWC and away from babel with MUI?
Thanks!
so until this is added @flaviendelangle we would need to add babel/runtime as a peer dep?
Not sure, I never user yarn pnp
, but we should release in a few days.
Also, a little off topic but is there any intention to move towards SWC and away from babel with MUI?
Not that I am aware off, why ?
Also, a little off topic but is there any intention to move towards SWC and away from babel with MUI?
Not that I am aware off, why ?
I'm fairly new to dealing with babel and SWC but from my understanding SWC is about 20x faster than Babel and also decreases overall size of the repo and code sent to client. I dont know how much that affects the runtime for babel since a lot of the cost is in compilation and with production builds that's all done in advance, but still, I have transitioned our whole codebase out of babel and trying to keep it that way haha.
SWC is about 20x faster than Babel
Yes, on our side SWC would most likely be a lot faster. However we use a good amount of babel plugins and I don't know how mature is the SWN ecosystem. With that being said, if we can migrate one day, I will be in favor of doing it.
decreases overall size of the repo and code sent to client
I am curious about that one Unless babel is doing something terribly wrong, I guess decrease in runtime size comes from less support from older browser. Something a product like ours must be very careful with.
It is clearly something we will investigate some day :+1:
Duplicates
Latest version
Current behavior π―
Yarn PnP (Plug'n'Play) is more strict when it comes to specifying a library's peerDependencies / dependencies correctly. Currently, @mui/x-date-pickers is missing the following entries in peerDependencies:
@babel/runtime
@emotion/react
(because it's a peer dependency of@mui/system
)@emotion/styled
(because it's a peer dependency of@mui/system
)This results in errors like this one:
Expected behavior π€
If the mentioned packages were added to peerDependencies, these errors would not occur with yarn pnp.
Steps to reproduce πΉ
Steps:
npx create-react-app mui-x-date-pickers
yarn set version berry
in order to get the latest yarn version with pnpyarn add @mui/x-date-pickers @mui/material @mui/system
function App() { const handleDateChange = () => { };
return ( <CalendarPicker date={null} onChange={handleDateChange} /> ); }
export default App;
System: OS: macOS 12.3.1 Binaries: Node: 16.11.1 - /opt/javascript/ncanode/16.11.1/node/bin/node Yarn: 3.2.0 - /opt/javascript/ncayarn/1.22.4/bin/yarn npm: 8.0.0 - /opt/javascript/ncanode/16.11.1/node/bin/npm Browsers: Chrome: 101.0.4951.54 Edge: Not Found Firefox: 99.0.1 Safari: 15.4 Browser used: Brave [Version 1.37.116 Chromium: 100.0.4896.127 (Official Build)]