-
Notifications
You must be signed in to change notification settings - Fork 14
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
Syntax highlighting works locally but breaks in deployed site on Vercel #288
Comments
I'm having similar issues with my app: https://markdown-videos.jorgenkh.no/ My code highlighter looks like this: <script lang="ts">
import Highlight from 'svelte-highlight';
import type { LanguageType } from 'svelte-highlight/languages';
import atomOneDark from 'svelte-highlight/styles/atom-one-dark';
export let code: string;
export let language: LanguageType<string>;
export let style = atomOneDark;
</script>
<svelte:head>
{@html style}
</svelte:head>
<Highlight {language} {code} /> In case you want to look at more of the code, my project is open-sourced here This is how it looks: ProductionLocal previewLocal devrelated to Snailedlt/Markdown-Videos#131 |
Having the same issue with https://github.com/MordechaiHadad/svelte-complete |
|
For some reason this works for me! I had the same issue, rendering thecode with Thanks @shinokada |
For reference, I've added a Vite + Svelte 5 example set-up. |
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.
The text was updated successfully, but these errors were encountered: