-
Notifications
You must be signed in to change notification settings - Fork 170
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
Embedding NGL 2.2.2 (via nglview
) doesn't work anymore
#1014
Comments
Oh, |
@hainm a view of the line that fails within the source code would be very useful, or a way to reproduce it (a live version somewhere?) |
Dear @papillot Please download (and rename) this file: https://github.com/jupyter-widgets/ipywidgets/files/13894919/index.html.txt |
Thanks for this. I did a first pass at investigating this last week. This is related to a change in the bundling system. The esm module that is loaded in this case, contains mangled names for Three.js dependency constants. |
Dear @ppillot, do you have a solution yet? If not, is it possible to follow the old way that works? |
For various reasons, I haven't made any progress on this. I did investigate further and noticed that the previous code also had mangled identifiers. |
thanks for the update. |
It seems to me that upgrading to latest NGL (in this thread) will prevent User reported that nglview 3.0.8 works fine but the subsequent versions do not work. We introduce new NGL after 3.0.8 |
It's hard to describe this issue but I will try my best.
Basically
nglview
uses this chunk of codes to generate the embeddable HTML: https://github.com/nglviewer/nglview/blob/98d7df9c5b2c035278724eacfb8184631c17015b/js/webpack.config.js#L48-L73Something like below (in juypter notebook):
Upgrading from NGL
2.0.0-dev.39
to2.2.2
make the embedding stop working. Below is the error:I originally thought it was an issue with ipywidgets (jupyter-widgets/ipywidgets#3878), but I've tried to switch back to NGL
2.0.0-dev.39
with the same ipywidgets version and thing still works properly.Can you please have a look.
Thanks
Hai
The text was updated successfully, but these errors were encountered: