Open mayteio opened 5 years ago
I'll come back to looking at this again once I finish some other things. The core issue is they, like some other libs are using node globals like global
and it breaks some other stuff in the API with webpack builds. We have to ignore global
and others in order to build properly. I'll circle back this soon, but I am totally open to suggestions.
This is the main reason I have been using rmwc for material components and it works great.
Thanks for the direction. I've never come across rmwc before, will check it out.
Have you had a chance to come back to looking at this again?
I am seeing the same TypeError: node.addEventListener is not a function
described above. I am not using material-ui, but am trying to integrate into an existing 'dashboard' configuration that utilizes many different react packages. This complex dashboard it making it difficult for me to track down the real cause for this 'TypeError.'
I haven't been able to work around libraries that are exposing node global
. There has been a couple of other libraries that do this and they currently conflict with our web assembly modules. I have no fix.
This works great out of the box, however, when I try to include common react packages (material-ui in this case) I get a string of errors.
First, when including any Material-UI component I get a duplicate module error (module
warning
included twice).To fix this, I create an alias for warning:
This creates a new error -
global is not defined
. So I create global via a newly defined webpack plugin:This compiles, but I get the error
TypeError: node.addEventListener is not a function
.This is caused when the DOM node isn't instantiated before adding an event listener. This comes back to the
addDOMNode
function that bootstraps the app.Any ideas on how to resolve this?