Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code Splitting / Lazy loading #49

Open
dbrxnds opened this issue May 21, 2020 · 1 comment
Open

Code Splitting / Lazy loading #49

dbrxnds opened this issue May 21, 2020 · 1 comment

Comments

@dbrxnds
Copy link

dbrxnds commented May 21, 2020

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?

@maps82
Copy link

maps82 commented May 29, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants