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

174
Visualizações
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 Respostas
Responde à pergunta

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 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