Feature request: Import support, through file names and esm or --experimental-modules

It’s crazy that runkit doesn’t support most modern front end javacript, at all.

There are 2 potential solutions,

  1. Allow us to name parts of the notebook as files… then we can import them with esm
  2. A checkbox to enable the --experimental-modules flag

Hi @hesygolu,

The reason we don’t support this yet is precisely because it is an experimental feature. In fact, it only showed up in its bare bones form very recently in node and is still very unfinished (and arguably not in an entirely usable state). Had we supported any of the previous, now abandoned, incarnations, we’d have a bunch of notebooks that don’t work or would require strange bridging of old proposed solutions vs. current, theoretically stable (but I wouldn’t be surprised if it changes yet again), solution. In my experience most of the “real world” use of esm has been through transpilers (which don’t necessarily match the semantics of “real” import) and things like the “esm” package from node. We are also not terribly excited in betting on any particular userspace implementation.

We are working on ways to arbitrarily set any node flag, which should alleviate this concern in theory, but the reality is that that node ecosystem isn’t really there on esm yet. Is there a particular package that you are unable to use because it is esm? If so, it could certainly help us in determining the right way to move forward.

Thanks,

Francisco