[core] Fix @mui/material package building #35324
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi there.
I found out that material package built folder structure has changed unexpectedly since 5.10.3. I have researched and found that there were no reasons for that kind of change and the problem is in adding a new file to the package root in this PR: #32735 that affects this part of the building script. While learning changes I did not found any reason why this should stay as it is, I event did not find any usage of this file. So my idea is to remove files from the root by putting it into a folder, so the building algorithm is going to perform as it was before 5.10.3.
Why is the folder structure important to me? Well, I try to use best practices of using material-ui and one of them is to import specific component by a specific path instead of importing the whole package. Unfortunately, this approach does not work with ESM that is necessary for me. That's why I've reported the issue. Until it is fixed, I have to resolve all imports to a specific files in the package. I know that you do not promise that internal files are not going to be changed, but I also hope that all your changes are reasonable. The current one is not.
By the way, I don't pretend to be right about fixing the issue this way. So my main goal is to rollback a building algorithm.