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

162
Views
way to perform ast manipulation on webpack output code with a plugin (patch webpack_require)

Goal

I'm trying to personalize the webpack output to add some information when requiring a module like if the module is currently loading or already loaded (webpack_require).

Currently i'm patching the webpack_require at asset level creating a new ConcatSource, but this is a short term solution.

How can i manipulate the webpack emitted code (not the .ts/.js original files,just the module entry code and other webpack glue) in a safe and efficient way?

Usage

This is required to create a zero configuration module discovery (discover and inject Nestjs stuff automatically) that support circular dependence.

I tried to look around and found this: https://github.com/adierkens/webpack-inject-plugin but is unmaintained and it's not working anymore.

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!