Skip to content

Syntax highlighting works locally but breaks in deployed site on Vercel #288

@hughess

Description

@hughess

We use the Highlight component in our website which is deployed on Vercel. The syntax highlighting will work locally, but will not work once deployed to Vercel. The line numbers and code styling continue to work, just the syntax colours are not applied at all.

When I look in devtools locally, I see each portion of the code split into tags to apply the colours, whereas in the Vercel deployment I only see one tag per line of code, without any colour applied.

We are using the Vercel adapter.

<Highlight language={markdown} {code} let:highlighted>
  <LineNumbers {highlighted} hideBorder {wrapLines}
      --line-number-color="rgb(226 232 240)"
      />
</Highlight>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions