Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility with Babel 7 and Webpack 5 #4

Open
heberleh opened this issue Nov 12, 2020 · 0 comments
Open

Compatibility with Babel 7 and Webpack 5 #4

heberleh opened this issue Nov 12, 2020 · 0 comments

Comments

@heberleh
Copy link

heberleh commented Nov 12, 2020

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant