jupyter-widgets / ipywidgets

Interactive Widgets for the Jupyter Notebook
https://ipywidgets.readthedocs.io
BSD 3-Clause "New" or "Revised" License
3.16k stars 950 forks source link

Check public path for AMD modules #3474

Closed jasongrout closed 2 years ago

jasongrout commented 2 years ago

https://github.com/jupyter-widgets/ipywidgets/pull/3464 may need some more work. It seems that the webpack auto public path does not work inside of AMD modules, since by the time the AMD callback is called the currentScript is null. This would affect the various amd modules generated by the html manager. This is hinted at in https://github.com/jupyter-widgets/ipywidgets/pull/2191#discussion_r214508413. See also https://github.com/jupyter-widgets/ipywidgets/pull/1652, https://github.com/jupyter-widgets/ipywidgets/issues/1650.

A workaround for automatically figuring out the public path in an AMD module using the require 'module' magic dependency is at https://github.com/jupyter-widgets/widget-cookiecutter/pull/103

jasongrout commented 2 years ago

@xiaochen-db and I confirmed that using the html manager libembed-amd.js file from requirejs is currently broken on master. We do indeed need the fix from https://github.com/jupyter-widgets/widget-cookiecutter/pull/103