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

172
Vistas
How to create a commons chunk file from two packages?

I have two private packages with their own package.json, dependencies etc.

I have installed both into a third package with the idea I could then use webpack to build them and a commons chunk file, however it doesn't appear to want to play ball.

npm install /my/local/package1
npm install /my/local/package2

(in reality, I'd use a private npm or git)

in webpack.config.json

module.exports = {
  entry: {
    'package1': 'package1',
    'package2': 'package2'
  }
  ...,
  plugins = [
    new webpack.optimize.CommonsChunkPlugin({
      name: "commons",
    }),
    ...

When it builds, I get both packages built fine but only a minimal commons file.

I'm testing it with two packages that are identical aside from name, so should have everything in common.

Is there a way to get this done?

Or other strategy to allow me to develop separate apps, that can then be exported together with a commons chunk..

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

Think I have solved it by setting minChunks = 2 - is it 3 by default? no mention of defaults as far as I can see on the docs.

over 4 years ago · Santiago Trujillo 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