mui/material-ui-pickers

Global export name for Material UI changed

ASnow opened this issue · 2 comments

ASnow commented

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 commented

My solution
Create extra js file between material and pickers

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

umd build are only for prototyping and legacy