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

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