I've my SSR repo(inferno-react like lib) bundled using webpack. It has 2 route files, 1 for server and 1 for client, exactly same but chunking is happening at client side using require.ensure.
One of the route looks like this:
<Route path="/home" getComponent={(props, cb) => {
require.ensure([], require => cb(null,
require('../views/containers/Home').default), 'home');
}}/>
Meaning, when browser will be parsing .html and bundle.js is downloaded on the browser, webpack will then insert that chunked route's component's .jsscript tag into html and then it will be downloaded. But that slows it a little bit as that route's .js is downloaded only after bundle.js is downloaded... So, I'm manually adding script tag from server for whatever requested chunk route dynamically with help of webpack-manifest-plugin. But, now, for every requested route, I've double script tags in the .html file for that chunked component. One due to manually adding on server and one when we create chunk in webpack using require.ensure.
Things work but fine 2 script tags! :/
Is there a way I can avoid it Or how else can I handle it while keeping the chunking at client side.