I’m getting glMatrix = dt: invalid module on a whole bunch of notebooks that try to require gl-matrix. The bundle.run alternative works okay, but maybe isn’t ideal.
There are a whole bunch of now broken notebooks
It seems like maybe gl-matrix 2.X worked okay with a bare require but now version 3 does not?
I don’t have time to investigate deeper. Maybe someone else wants to take a look?
I think I’d prefer an audit feature that tells me which require or import calls have no explicit version. Perhaps Observable could warn if I publish a notebook without a pinned (major) version?
At some point in the future, we plan to ship automatic version pinning that will function similarly to a yarn.lock, pinning the exact version of transitive dependencies the first time they are loaded (and some sort of UI for upgrading dependencies). But we’re still working out the details, implementation, and user interface.
Firefox was the major hold-out, but now that the last two versions of FF have supported dynamic import, it’s pretty close to the point where we can recommend without reservation.
I’m not sure that Edge is worth optimizing for at the moment, given that its market share is below IE, and that future versions will be based on Chromium.
I’m not sure how I feel about cloning existing/established code into notebooks like this, but it was pretty low-hanging fruit and has the nice result that you can directly click the imported token and jump to the implementation.