-
Notifications
You must be signed in to change notification settings - Fork 80
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
Static component import not working #191
Comments
Where is your |
|
Right, that's a synchronous import that isn't covered by this component. The const ListingPage = universal(import('./listing/components/Root'), { onError: exceptionHandler }); That sort of thing. |
So, basically I cannot pass a component already imported to Universal? |
I'm not completely certain of whether you can or not, but I'd question why you'd want to. An An My guess is that you're wanting to use this library for code splitting. In that case, if you're using the |
That makes sense, but what I'm aiming here is to do an incremental code splitting. Some routes, which I would explicitly pass an previously imported component, would just use it, but the other routes with a string as the component would fetch it at runtime. That way I can really leverage the power of code splitting, bundling some pages that will always be used and fetching the others as needed. |
You'll need to refactor the calling code in that case. One way to do it with your example given above would be to replace the string references to components above with the RUC instances. |
According to this line of code, the component can either be a string or a component:
But when we try to import the component:
An error is being returned:
How the component should be imported?
The text was updated successfully, but these errors were encountered: