ipywidgets icon indicating copy to clipboard operation
ipywidgets copied to clipboard

Packaging issue with @jupyter-widgets/base and backbone when loaded as an esm module

Open paddymul opened this issue 1 year ago • 0 comments
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

  1. Go to https://codepen.io/paddymul/pen/qBerprv
  2. https://codepen.io/paddymul/pen/qBerprv
  3. Open the JS console
  4. 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

paddymul avatar Oct 14 '24 22:10 paddymul