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

89
Views
Bundler optimization - js

I am working in legacy project whose is multi page application. We have multiple react apps localized in many different location returned by php routes, also we have multiple jQuery, pure js, and another libs modules (After all years app had many different frontend leaders whose add some libs and framworks). For bundling we currently using webpack 4, but in the near future i intend to update it. In project we have one package.json whose have all dependencies for all ours modules. Project structure look like this:

Module1
  dist/
  src/
    index.js
    ...another files.
Module2
  dist/
  src/
    index.js
    ...another files.

node_modules/
package.json
webpack.config.js

webpack config file have multiple config files, and we are merging it with webpackmerge and returning arrays

module.exports = ({ mode, app }) => {
  switch (app) {
    case 'commonJs':
      return [
        anotherLibs(mode),
        webpackMerge(commonJs, commonJsStyles(mode)),
      ];
    case 'react':
      return [
        webpackMerge(reactApp, commonReactConfig(mode)),
        webpackMerge(reactApp2, commonReactConfig(mode)),
        webpackMerge(reactApp3, reactTypescriptConfig(mode)),
      ];
    default:
      return;
  }
};

And here is the problem, all of this returned dist files are big. I want to optimize it and remove unused dependencies. Can You advice me how I can handle this in the best way ? We want to create fastest builds and optimize app performance.

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!