-
-
Notifications
You must be signed in to change notification settings - Fork 32.6k
Description
Duplicates
- I have searched the existing issues
Latest version
- I have tested the latest version
Summary 💡
I would like to request a reverse version of the top-level-imports codemod.
Given https://mui.com/material-ui/guides/minimizing-bundle-size/#option-one-use-path-imports Path Level Imports is the easiest solution when dealing with slowness but especially when using CRA it can be very hard to configure top-level-imports to run smoothly.
Examples 🌈
https://github.com/mui/material-ui/blob/master/packages/mui-codemod/src/v5.0.0/top-level-imports.js but in reverse
Motivation 🔦
I am experiencing slow tests and startup times and I was following the documentation here: https://mui.com/material-ui/guides/minimizing-bundle-size/#option-two-use-a-babel-plugin. However when adding the necessary steps tests will fail because of other third party modules that use Material and are incompatible with the change.
I would like to try out if turning back from top-level-imports
to path-imports
will solve our issues but in order to see the results I would need to manually rewrite a ton of code, and a codemod would be very helpful instead.