Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

76
Vistas
webpack is building a lots of files instead of one

When building my app with webpack to the ./dist folder, I get a lot of file whereas I'm expecting to have only one. My ./dist folder looks like:

657.main.js
657.main.js.LICENSE.txt
657.main.js.map
726.main.js
main.js
main.js.LICENSE.txt
main.js.map

When I'm expecting:

main.js

My webpack config is the following:

const path = require('path')

module.exports = {
  mode: 'production',
  devtool: 'source-map',
  entry:  './src/index.js',
  output: {
    filename: 'main.js',
    path: path.resolve(__dirname, 'dist'),
    library: 'foobar',
  }
}

When removing all other files except main.js I get errors.

Is there a way to build my app to only one file?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Webpack by default is chucking/code splitting the modules. You can disable/set max number of chunks it by using this plugin:

https://webpack.js.org/plugins/limit-chunk-count-plugin/

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda