Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

184
Visualizações
How to add Webpack to a project for strictly minification?

I am a dev on a web application that consists of Java Server Pages which act as the HTML, a Java backend, and Javascript front-end files. I have been tasked with looking into adding Webpack to the project, with the goal of only using it to minify Javascript files at first (eventually we will use more of Webpack's features of course). I have tried doing research via Google into Webpack minification, but I am having trouble finding anything detailing how to use it for just minification, instead of bundling the project files.

Does anyone know how to use Webpack for strictly Javscript minification?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Webpack out of the box is anticipating on processing JS and will run minification on production builds by default.

https://webpack.js.org/configuration/mode/ (different build modes)

Assuming you are already past configuring a JS entry file to consume all your JS files: https://webpack.js.org/configuration/entry-context/#entry

AND configured a loader on how to handle each JS file imported in your entry file appropriately. (Feels like you want asset/resource. Pay close attention to asset modules type and generator options) https://webpack.js.org/guides/asset-modules/

The settings for minification on a production build are what is known as the optimization.minimize configuration of your webpack.

https://webpack.js.org/configuration/optimization/#optimizationminimize

With Webpack5, further options around the minification engine has been exposed and is known as optimization.minimizer configuration options: https://webpack.js.org/configuration/optimization/#optimizationminimizer

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda