3 ms·
I haven't tried this with any node modules but you should be able to set imports.searchPath to include your node_modules folder, at least for testing: https://g
by cycloptic 6y ago
I haven't tried this with any node modules but you should be able to set imports.searchPath to include your node_modules folder, at least for testing: https://gitlab.gnome.org/GNOME/gjs/-/blob/master/doc/Modules.md#more-about-imports https://gitlab.gnome.org/GNOME/gjs/-/blob/master/doc/Modules...
Since there is no inbuilt support for Node APIs this will probably only work with modules that have no dependencies and are built into a single file. ES6 module support is WIP and ongoing: https://gitlab.gnome.org/GNOME/gjs/-/issues/328 https://gitlab.gnome.org/GNOME/gjs/-/issues/328