kLabz / haxe-material-ui

Haxe externs and tools for material-ui
MIT License
9 stars 5 forks source link

Support UMD #15

Open kevinresol opened 3 years ago

kevinresol commented 3 years ago

Support adding -D mui.global to switch to @:native generation so we can use UMD module without the build process

kLabz commented 3 years ago

Thanks, I'll check my other branches to sync and I'll merge :+1:

kevinresol commented 3 years ago

Just a regex find and replace in vscode:

@:jsRequire\('@material-ui/core', '(\w*)'\)

#if mui.global @:native('MaterialUI.$1') #else @:jsRequire('@material-ui/core', '$1') #end

kLabz commented 3 years ago

That doesn't cover all cases, though. See line 25 of Table.hx for example.

Edit: also, mui.lab and mui.icon packages

kevinresol commented 3 years ago

I think there is no cdn-hosted umd-build for lab (or at least I can't find it)