Currently there is no documentation or way to code split (as far as I could find) using the ReactBundle setup as shown in the tutorial.
I have tried using React Lazy as well as regular JS dynamic imports including different Webpack settings in both cases but the end result remains a single verisoned app.js file.
My theory is that the ReactOnRails.register() function combines all components thus defeating the purpose of code splitting.
Could anyone point me in the right direction on how to approach this issue?
I don't think it will work without patching ReactOnRails and/or this bundle, as the current render path doesn't seem to support async functions. But I would also like to get this implemented.
Currently there is no documentation or way to code split (as far as I could find) using the ReactBundle setup as shown in the tutorial.
I have tried using React Lazy as well as regular JS dynamic imports including different Webpack settings in both cases but the end result remains a single verisoned app.js file.
My theory is that the
ReactOnRails.register()
function combines all components thus defeating the purpose of code splitting.Could anyone point me in the right direction on how to approach this issue?