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

Global export name for Material UI changed #2180

Closed
2 tasks done
ASnow opened this issue Mar 15, 2021 · 2 comments
Closed
2 tasks done

Global export name for Material UI changed #2180

ASnow opened this issue Mar 15, 2021 · 2 comments
Labels
status: needs triage These issues haven't been looked at yet by a maintainer.

Comments

@ASnow
Copy link

ASnow commented Mar 15, 2021

Since mui/material-ui#13142 Material UI changed global export name to MaterialUI instead material-ui

  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

Material dependencies are failed when library exported into global namespace of window (not import commonjs, amd)

Expected Behavior 🤔

Imports ok

Steps to Reproduce 🕹

Just use direct script imports of material and material-pickers

<script src="material.umd.js" />
<script src="material-pickers.umd.js" />

Context 🔦

Externals support

Your Environment 🌎

Webpack with linked externals

Tech Version
@material-ui/core v4.11.0
@material-ui/pickers v3.3.10
React
Browser
TypeScript
etc.
@ASnow ASnow added the status: needs triage These issues haven't been looked at yet by a maintainer. label Mar 15, 2021
@ASnow
Copy link
Author

ASnow commented Mar 15, 2021

My solution
Create extra js file between material and pickers

window['material-ui']=window['MaterialUI'];

@oliviertassinari
Copy link
Member

umd build are only for prototyping and legacy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs triage These issues haven't been looked at yet by a maintainer.
Projects
None yet
Development

No branches or pull requests

2 participants