electron - Adding external javascript file in javascript -


this question has answer here:

i writing electron program , want use javascript classes in main process. prefer have classes in different files , include them inside of script.

i did adding both, script , classes inside html file since main process there not html file.

question possible include external javascript file in different javascript file?

since electron node based, can use require both in main process js file , in js file project uses.

// main.js or let mymodule = require("./mymodule");  // mymodule.js .... module.exports = function() {}; // or whatever want share main.js 

Comments

Popular posts from this blog

python - Alternative to referencing variable before assignment -

vb.net - How to ignore if a cell is empty nothing -

javascript - How to bind ViewModel Store to View? -