Closed kurmasz closed 1 month ago
Thank you. Can you share a minimal script that reproduces the error you see, so that I can take it into account while reviewing the proposed change?
This repo both demonstrates the error and demonstrates how I intend to use the modified package: https://github.com/kurmasz/notebookjs_mre
Thanks again, and apologies again for the delay in responding/merging. Let me know if you encounter issues even after the merge of #55.
Please remove the dependency on
this
being defined. Doing so will allow notebookjs to be use withimport
in addition torequire
.Here is the problem: If I want to use
notebookjs
client-side in an enviroment that usesimport
instead ofrequire
, the import statement fails when it reaches line 6, becausethis
(and thereforeroot
) are undefined.(Changing line 5 to var root =
this || globalThis
addresses my issue; but, I don't know enough about different JavaScript module systems to say that this solution is robust or complete.)