Skip to content

Compatibility with Babel 7 and Webpack 5 #4

@heberleh

Description

@heberleh

When I import JupyterReact, not even use the class, my react app breaks:

...thing/./node_modules/jupyter-react-js/index.js?:1 contains Uncaught TypeError: m is undefined (production mode)

I am first trying to make jupyter-react to work with Babel 7 and Webpack 5. In other words: if I run a simple react app without importing jupyter-react class and it works, if I import the JupyterReact class, then the app breaks and returns that TypeError message.

I tried many things, changing plugins and Babel-env settings, for instance: modules off, umd and commonjs.

For reference, this is a guide for using React and webpack 4 and Babel 7: https://www.digitalocean.com/community/tutorials/settingup-reactjs-using-webpack-4-and-babel-7-the-definitive-guide

It feels like Babel is not compiling or integrating the jupyter-react module into the bundle.js/index.js. If I use Babel 6 the example works, but then if I try to use my react component that I generated with Rollup and Babel 7, and installed it with npm setting a dependency on that projects folder, it complains that I am using Babel 6 and the component uses Babel 7. That is why I am trying to use everything with Babel 7.

Any thoughts that could help to test some other options?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions