1

When using Webpack, when configured to generate a runtime chunk and other chunks (such as vendor chunks), does it matter what order the runtime chunk is included onto the page relative to other chunks or can it be in any order?

Assuming the following runtime chunk configurations:

module.exports = [{
    //...
    optimization: {
        runtimeChunk: true,
        splitChunks: {
           // configured to split vendor chunks
        }
    }
    //...
}];

OR

module.exports = [{
    //...
    optimization: {
        runtimeChunk: 'single',
        splitChunks: {
           // configured to split vendor chunks
        }
    }
    //...
}];

After some testing I find that it functions correctly no matter what the order, but I can't find any documentation explicitly alluding to the need for specific ordering or support for any ordering of the chunks and this information could be useful to others.

Luke
  • 22,826
  • 31
  • 110
  • 193

0 Answers0