-
Notifications
You must be signed in to change notification settings - Fork 34
Nuxt sometimes ending up in broken state with false
in console pointing to nuxt-booster-message-weak-hardware
#1253
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
Comments
Hello @codeflorist, Basically, the behavior is correct, but only occurs when loading the page is time-consuming for the browser. This may also occur on old devices. You can generally deactivate the performance check via https://basics.github.io/nuxt-booster/guide/options.html#detection However, this can then lead to poorer performance values on Lighthouse. I just noticed that something is missing in the documentation... You could try this out:
If blocked, an initialization takes place here after 3 seconds. |
Many thanks @ThornWalli for your fast response! My problems mostly occur when the site is inside the visual-editor-iframe of Storyblok. There is a lot of stuff going on in this case and it might trigger the performance detection. I've now put this in my config:
I haven't seen the mentioned problem yet after applying this. So this seems to fix the problem. It seems page speed score has taken a hit of 2 points. But it's definitely more important everyone can use the site. I haven't tried the experimental option yet. I'll report back once i have. |
@codeflorist There is another way you could probably decide this at runtime. How is your setup structured?
You could use this on the server side: https://basics.github.io/nuxt-booster/components/booster-layer.html#force-app-initialization Important: It must already be in the rendered HTML. useHead(() => {
return {
script: [
isStorblokPreview() && {
innerHTML: `window.__NUXT_BOOSTER_AUTO_INIT__ = true;`
}
].filter(Boolean)
};
}); And deactivate the layer if you have installed it on the server side and on the client side if storyblok Preview. <info-layer v-if="!isStorblokPreview" critical /> If you try this, update the dependency again. |
Describe the bug
I'm periodically seeing my Nuxt app ending up in a broken non-interactive state. - requiring a complete reload.
This is the warning, that is displayed in the console in these cases:
And this is the code, where the warning is thrown:
My only nuxt-booster config is:
Can i disable the weak-hardware-behaviour somehow?
Sorry for not being able to provide more details or a reproduction, but due to the bug only happening very inconsistently, i'm having trouble providing such.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: