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

216
Visualizações
Webpack have just one html import, without having to implicitly import other chunks

I have multiple entrypoints in my project which have different chunks (for example a vendor chunk). Now the issue is that my entrypoints don't work without implicitly importing the vendor chunk and the runtime file.

What I have to do

<script defer="defer" src="runtime.js"></script>
<script defer="defer" src="399.js"></script>
<script defer="defer" src="standalone.js"></script>

What I want to do

<script defer="defer" src="standalone.js"></script>

How can I make it so by just importing standalone.js it automatically imports runtime.js and 399.js without having to implicitly do this in the html file. Can this be done?

Config

module.exports = {
    entry: {
        standalone: path.resolve(__dirname, '../src/index.standalone.tsx')
    },
    resolve: {
        extensions: ['.tsx', '.ts', '.js']
    },
    output: {
        path: path.resolve(__dirname, '..', './build')
    },
    optimization: {
        runtimeChunk: 'single',
        splitChunks: {
            chunks: 'all'
        }
    },
    plugins: [
        new HtmlWebpackPlugin({
            template: path.resolve(__dirname, '..', './public/index.standalone.html')
        })
    ]
};
about 4 years ago · Juan Pablo Isaza
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