fix(vscode): allow Shiki module worker by adding worker-src to CSP (#2047) (#2058)

Co-authored-by: bashrusakh <bashrusakh@users.noreply.github.com>
This commit is contained in:
Leonid
2026-07-11 14:50:00 +03:00
committed by GitHub
co-authored by bashrusakh
parent 4e591503ce
commit 17af1f3369
2 changed files with 4 additions and 2 deletions
@@ -29,7 +29,8 @@ const getWorker = (): Worker | undefined => {
if (typeof window === 'undefined' || typeof Worker === 'undefined') return undefined;
try {
worker = new Worker(MarkdownShikiWorkerUrl, { type: 'module' });
} catch {
} catch (err) {
console.error('Failed to create Shiki worker:', err);
return undefined;
}
worker.onmessage = (event: MessageEvent<MarkdownWorkerResponse>) => {