This repository was archived by the owner on Sep 20, 2024. It is now read-only.
This repository was archived by the owner on Sep 20, 2024. It is now read-only.
Bug (Nuxt:Colormode): Static deployments on Nuxt.js does not initialize with cookie color mode. #288
Open
Description
Since statically pre-rendered routes pre-render the page, the color mode is already inserted in the Chakra Application.
With Nuxt Server deployment, the Chakra Module is able to extract the current color mode based on the user's cookie content.
However, with static rendering, this process gets interfered with. To solve this we need to:
- Fallback to using
localStorage
for pages prerendered with Nitro. The client plugin already uses this approach. - Detect the current rendering mode, and apply the
colorModeManager
in the Nuxt plugin and apply it here