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

120
Views
Trying to use global.require in Electron

I'm trying to do pretty much the same thing as this post: Using node require with Electron and Webpack

Basically, I need Electron to read other js files that weren't together in the build. But when using global.require, I'm getting the following error:

webpack_require.g.require is not a function

I can use require(module) normally, but not global.require(module)

My code in App.js:

var comp = (global.require('../../plugins/' + plugin).default);
alert(Object.keys(comp));

Any idea?

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!