-
Notifications
You must be signed in to change notification settings - Fork 4
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
Can you increase the code splitting part, do you have such an idea #3
Comments
you can use |
Can the Dynamic Imports portion be SSR |
yes it will work on both server and client |
I tried using dynamic imports and found that SSR didn't work
Indicates that all is well loaded, but if you open the source code
only
The SSR has no normal output but, Normal import, use
SSR is fine I am the dynamic import method is wrong?What's the problem? |
Sorry, I use your method, I will get an error, the error code is as follows
This is my code
|
My bad about the state thing, it was actually correct. Go back to your original code.
|
It's so complicated, I don't understand it at all, can you add this to this example? |
Please, add it to Example. All it takes is for an arbitrary component to load successfully and support SSR, |
I added a PR, add dynamic-import, please have a look, there is some error, help to fix and then merge, thank you very much |
I want to know how to use code splitting in a project with ssr enabled. As far as I know, there are several ways to achieve it.
The first is the method I currently use, with the help of npdev-react-loadable, but there is a problem. The files loaded by npdev-react-loadable are not accurate, which leads to too many and large files.
The second type, using @loadable/components, file splitting is very precise and powerful. Variables and node plugin packages can be dynamically loaded. This is the only package that can do this level. However, due to the need to configure webpack, in meteor It can’t be used, at least I don’t know how to use it.
The third one is to use import(), but I don’t know how to use it or whether it will work.
Finally, use react's lazy, but lazy does not support ssr, so give up
I have moved the project to this demonstration, which is very good, but I lack the function of code splitting and urgently need this function, because my project has too many files and I need SEO, and I hope that the first loading speed is fast enough. Do you see this question, do you have any ideas to increase the code splitting, take a moment to make this demonstration more powerful and perfect, I will always pay attention to this question, check it out every few hours, have you come back, poor people :)
The text was updated successfully, but these errors were encountered: