For that, my friend, use a namespace. Create an object, say "util", that holds your utility functions, and then import it into your main-entry file. For more info on how to create such object, look for Module Revealing Patterns, or something similar, here's and example https://medium.com/@Rahulx1/revealing-module-pattern-tips-e3442d4e352
I personally use it in such way:
// utils.js file content
var utils = (function(){
var module = {};
// publick method
module.sayHello = function(){
alert("hello there");
};
return module;
// Private method
function sayBey(){ / ... / }
})();
// In your main entry file "gui.jsx"
#include "utils.js"
utils.sayHello();
... View more