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

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -