ioBroker / ioBroker.javascript

Script engine for JavaScript and Blockly
MIT License
323 stars 119 forks source link

Support "script modules" (Requires NodeJS 10+) #86

Open AlCalzone opened 6 years ago

AlCalzone commented 6 years ago

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.

GermanBluefox commented 6 years ago

Future => Feature ?

AlCalzone commented 6 years ago

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 commented 6 years ago

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

GermanBluefox commented 4 years ago

It is still experimental event in node 13

Apollon77 commented 3 years ago

Still experimental even in nodejs 15

AlCalzone commented 3 years ago

🙈