Skip to content
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

[core] Restrict top level imports that target CJS modules #23159

Merged
merged 7 commits into from Oct 28, 2020

Conversation

eps1lon
Copy link
Member

@eps1lon eps1lon commented Oct 19, 2020

Showcases how problematic the allowed top-level path imports are: Even we're doing it wrong. @material-ui/system/* will pull in CommonJS modules. The special casing of "it's ok from that package but not that one" is not really viable.

The current usage was not that harmful but I'll extend restricted-imports to avoid potential bigger issues in the future.

@mui-pr-bot
Copy link

mui-pr-bot commented Oct 19, 2020

Details of bundle changes

Generated by 🚫 dangerJS against 758734b

@eps1lon eps1lon marked this pull request as draft October 27, 2020 07:55
@eps1lon eps1lon marked this pull request as ready for review October 27, 2020 08:28
@eps1lon eps1lon merged commit 38b259e into mui:next Oct 28, 2020
@eps1lon eps1lon deleted the core/problematic-imports branch October 28, 2020 15:25
sujinleeme pushed a commit to sujinleeme/material-ui that referenced this pull request Oct 29, 2020
@zannager zannager added the core Infrastructure work going on behind the scenes label Feb 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Infrastructure work going on behind the scenes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants