ipywidgets
ipywidgets copied to clipboard
Packaging issue with @jupyter-widgets/base and backbone when loaded as an esm module
trafficstars
Description
I am trying to package my widget as a standalone npm module for use in codepen. When packaged with jsdelivr in esm mode, I get the following error loading the JS.
Uncaught TypeError: class heritage n.View is not an object or null
<anonymous> nativeview.js:53
Reproduce
- Go to https://codepen.io/paddymul/pen/qBerprv
- https://codepen.io/paddymul/pen/qBerprv
- Open the JS console
- Look at the type error from nativeview
Expected behavior
I would expect the
Context
This is built from a branch of my code https://github.com/paddymul/buckaroo/pull/298
I don't think the rest of the fields are relevant since this is a JS bug. But here are the relevant JS config files
Webpack from the branch https://github.com/paddymul/buckaroo/blob/chore/js-0.7.5-test9-reproduce/webpack.config.js package.json from the branch https://github.com/paddymul/buckaroo/blob/chore/js-0.7.5-test9-reproduce/package.json
Package built with yarn run build