Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

160
Views
About Electron JS push specific folders?

I'm in doubt, I'm new to Electron and I want to ask if it's possible to make it play only in selected folders?

A clearer example of what I mean...

const { app, BrowserWindow, webFrame } = require("electron");

app.whenReady().then(() => _startElectron());

var mainWindow;

async function _startElectron() {
    const { screen } = require('electron');

    // Create a window that fills the screen's available work area.
const 
    primaryDisplay = screen.getPrimaryDisplay(),
    { width, height } = primaryDisplay.workAreaSize;

mainWindow = new BrowserWindow({ 
    width: width,
    minWidth: 640, 
    height: height, 
    minHeight: 360,
    frame: true, 
    autoHideMenuBar: true,
    darkTheme: true,
    webPreferences: {
        devTools: true
    }
});

    mainWindow.loadFile("dist/gamefile.html");
}

app.on('window-all-closed', () => app.quit());

mainWindow.loadFile("dist/gamefile.html"); in that case it is opening in dist/gamefile.html, it means that all the game source code is being pushed into the .exe file created by Electron.

That's the question, is there a way for the electron builder to just push what's inside the /dist folder? I don't want to make the source code available, just the compilation inside /dist, but the compiler is pushing everything to the .exe.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!