ioBroker.javascript icon indicating copy to clipboard operation
ioBroker.javascript copied to clipboard

Support "script modules" (Requires NodeJS 10+)

Open AlCalzone opened this issue 6 years ago • 6 comments

Besides scripts in VMs, NodeJS 9+ supports modules in VMs: https://nodejs.org/api/vm.html#vm_class_vm_module

This could be used to modularize code in the JS adapter, as some users have already asked for.

AlCalzone avatar Mar 08 '18 07:03 AlCalzone

Future => Feature ?

GermanBluefox avatar Mar 10 '18 12:03 GermanBluefox

No, I mean future. Just as a reminder when NodeJS 9 (or rather 10) becomes the norm. At the moment we can't use this, but it could be a very nice feature.

AlCalzone avatar Mar 10 '18 13:03 AlCalzone

Now that NodeJS 10 is available to the public, we could tackle this similar to how NodeJS 6+ is using VM2.

AlCalzone avatar May 08 '18 13:05 AlCalzone

It is still experimental event in node 13

GermanBluefox avatar May 23 '20 08:05 GermanBluefox

Still experimental even in nodejs 15

Apollon77 avatar Feb 26 '21 21:02 Apollon77

🙈

AlCalzone avatar Feb 26 '21 23:02 AlCalzone