From bc81dc70d571b3e57665d90b0860f203cac8b525 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Mangeonjean?= Date: Sun, 25 Feb 2024 16:51:06 +0100 Subject: [PATCH 1/2] fix: missing import extension --- src/worker.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/worker.ts b/src/worker.ts index 5c0d289..ada35c2 100644 --- a/src/worker.ts +++ b/src/worker.ts @@ -2,7 +2,7 @@ import { Worker } from './tools/crossOriginWorker' export type WorkerLoader = () => Worker const workerLoaders: Partial> = { - editorWorkerService: () => new Worker(new URL('monaco-editor/esm/vs/editor/editor.worker', import.meta.url)), + editorWorkerService: () => new Worker(new URL('monaco-editor/esm/vs/editor/editor.worker.js', import.meta.url)), textMateWorker: () => new Worker(new URL('@codingame/monaco-vscode-textmate-service-override/worker', import.meta.url)), languageDetectionWorkerService: () => new Worker(new URL('@codingame/monaco-vscode-language-detection-worker-service-override/worker', import.meta.url)) } From 650de438f1452ca3a144cc58240003c836dde924 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Mangeonjean?= Date: Sun, 25 Feb 2024 16:51:46 +0100 Subject: [PATCH 2/2] fix: missing worker type --- src/features/viewPanels.ts | 2 +- src/worker.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/features/viewPanels.ts b/src/features/viewPanels.ts index 7607afa..d9199d4 100644 --- a/src/features/viewPanels.ts +++ b/src/features/viewPanels.ts @@ -7,7 +7,7 @@ import { registerWorkerLoader } from '../worker' import { Worker } from '../tools/crossOriginWorker' import '@codingame/monaco-vscode-references-view-default-extension' -registerWorkerLoader('outputLinkComputer', () => new Worker(new URL('@codingame/monaco-vscode-output-service-override/worker', import.meta.url))) +registerWorkerLoader('outputLinkComputer', () => new Worker(new URL('@codingame/monaco-vscode-output-service-override/worker', import.meta.url), { type: 'module' })) registerServices({ ...getTimelineServiceOverride(), diff --git a/src/worker.ts b/src/worker.ts index ada35c2..9f09b95 100644 --- a/src/worker.ts +++ b/src/worker.ts @@ -2,9 +2,9 @@ import { Worker } from './tools/crossOriginWorker' export type WorkerLoader = () => Worker const workerLoaders: Partial> = { - editorWorkerService: () => new Worker(new URL('monaco-editor/esm/vs/editor/editor.worker.js', import.meta.url)), - textMateWorker: () => new Worker(new URL('@codingame/monaco-vscode-textmate-service-override/worker', import.meta.url)), - languageDetectionWorkerService: () => new Worker(new URL('@codingame/monaco-vscode-language-detection-worker-service-override/worker', import.meta.url)) + editorWorkerService: () => new Worker(new URL('monaco-editor/esm/vs/editor/editor.worker.js', import.meta.url), { type: 'module' }), + textMateWorker: () => new Worker(new URL('@codingame/monaco-vscode-textmate-service-override/worker', import.meta.url), { type: 'module' }), + languageDetectionWorkerService: () => new Worker(new URL('@codingame/monaco-vscode-language-detection-worker-service-override/worker', import.meta.url), { type: 'module' }) } export function registerWorkerLoader (label: string, workerLoader: WorkerLoader): void { workerLoaders[label] = workerLoader