-
Notifications
You must be signed in to change notification settings - Fork 18
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
There's a problem with the MDC component that makes it too heavy and ruins your website's performance (blocking resource) #101
Comments
Not sure, what exactly causes this, but #93 (with nuxt/content#2422) might be related? |
Actually it's weird because if I use the utility "parseMarkdown" from "@nuxtjs/MDC/runtime" but rendering it with the ContentRenderer from "nuxt/content", it's still heavy but not that much, it doesn't affect that much to the performance and it's "acceptable" |
I have found the same issue. The MDC script is over 60% in size of the client bundle and seems to render client side. Which makes little to no sense to me. |
I'm not sure if this is related, but I just opened an issue concerning the And I agree that is a bit weird that this is client-side script. |
I have managed to write a composable that uses MDC to render an HTML object and then returns this as a string. This renders server side and in my test repo, i have seen a block time decrease from 1270ms to just 420ms on mobile (Lighthouse). Im pretty sure it can be written more effeciently, but it does the job! EDIT: EDIT nr. 2: Using the experimental feature: 'componentIslands' and adding the 'server' suffix to my component, the mobile performance index in Lighthouse went from 90 to 100. Here's the composable: And here is the component i use to mount/ render: |
I don't know what is the exact problem but there's something wrong for sure because it doesn't happens with the nuxt/content module.
The text was updated successfully, but these errors were encountered: