Skip to content

Compatibility with react packages (material-ui) #10

Open
@mayteio

Description

@mayteio

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:

resolve: {
    ...
    alias: {
      warning: path.resolve(__dirname, "node_modules/warning")
    }
  },

This creates a new error - global is not defined. So I create global via a newly defined webpack plugin:

plugins: [
    new webpack.DefinePlugin({
      global: {}
    }),
    ...
]

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions