Closed sparanoid closed 3 years ago
Thanks for raising this issue @sparanoid. Ideally, I'd like to avoid adding a dependency, such as Webpack or Rollup, to this project. Unfortunately, I haven't followed ES6 closely. Can you think of another way of modifying notebookjs
to fix your problem without adding a dependency?
The source of the problem appears to have been the use of dynamic require
statements in condRequire(...)
, which Webpack does not like: https://github.com/webpack/webpack/issues/196
The commit above should resolve this, now reflected in notebookjs
v0.6.2
. Closing for now, but feel free to reopen if the issue persists.
I tried to import this library with a React application:
...but got the following errors:
I think the problem is the whole script is wrapped inside an IIFE. That would work if this script can be packaged with Webpack or Rollup.