I'm using Webpack 4.x and have the following in my config:
splitChunks: {
chunks: 'all',
},
runtimeChunk: true
This results in three chunks in my project:
- app.prod.js
- 1.app.prod.js
- 2.app.prod.js
I'd like to load all three scripts using just one initial request. The reason for this is that I'd like to use the "preload" feature in Electron for security reasons, which accepts a single script.
Is there a way to have the initial app.prod.js
require/import the additional chunks automatically?