Skip to content

CodeGroup rendering tabs and CodeBlock on hard reload #2711

Closed
@ThaNarie

Description

@ThaNarie
  • I confirm that this is an issue rather than a question.

Bug report

Steps to reproduce

Visit a VuePress docs pages that renders multiple CodeBlocks in a CodeGroup, e.g. https://mubanjs.github.io/muban/guide/#installing

What is expected?

The tabs showing up, and the first tab showing highlighted code.

What is actually happening?

No tabs showing (although the space is there), and instead a highlighted message:

// Make sure to add code blocks to your code group

Other relevant information

When navigating to another page and back, the CodeGroup displays correctly.

It seems like it's some kind of re-hydration issue when using the rendered HTML.

It also seems to not happen locally.

  • Output of npx vuepress info in my VuePress project:
Environment Info:

  System:
    OS: macOS 10.15.6
    CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
  Binaries:
    Node: 12.13.1 - ~/.nvm/versions/node/v12.13.1/bin/node
    Yarn: 1.22.4 - /usr/local/bin/yarn
    npm: 6.12.1 - ~/.nvm/versions/node/v12.13.1/bin/npm
  Browsers:
    Chrome: 86.0.4240.198
    Edge: Not Found
    Firefox: 81.0.2
    Safari: 13.1.2
  npmPackages:
    @vuepress/core:  1.7.1 
    @vuepress/theme-default:  1.7.1 
    vuepress: ^1.7.1 => 1.7.1 
  npmGlobalPackages:
    vuepress: Not Found

Metadata

Metadata

Assignees

Labels

has PRHas a related PR

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions