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

125
Views
Looking for a way to merge multiple js scripts into one for a sandboxed eletron app

I am currently developing an electron app, using typescript.
As the renderer is sandboxed for security reasons, I need to pass a single .js file to the main Window.
However, due to the script being more than 2500 lines, it is currently split in multiple imported files, as would be a normal project.
How could I then merge the js files produced by typescript into a single complete file that could be passed to the electron Window ?
I tried Webpack, but I'm starting to think this is not the tool designed to do it.

what I am looking for:

entry.ts

import { Thing } from "./Thing"
const thing = new Thing();
thing.doSomething("hello world");

Thing.ts

export class Thing {
    doSomething(text: string) {
        // Stuff
    }
}

that would be processed into a single file:
main.js

class Thing {
    doSomething(text) {
        // Stuff
    }
}

const thing = new Thing();
thing.doSomething("hello world");

Thanks for the help !

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!