From 410021984ad267fe76c667a34a1c5d084a3868d7 Mon Sep 17 00:00:00 2001 From: _Kerman Date: Tue, 22 Oct 2024 19:57:00 +0800 Subject: [PATCH] fix: Monaco editor context menu in production --- packages/client/setup/monaco.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/client/setup/monaco.ts b/packages/client/setup/monaco.ts index fb6ab38cc3..74d1758da4 100644 --- a/packages/client/setup/monaco.ts +++ b/packages/client/setup/monaco.ts @@ -51,14 +51,13 @@ class ContextViewService2 extends ContextViewService { } } -const setup = createSingletonPromise(async () => { - // Initialize services first, otherwise we can't override them. - StandaloneServices.initialize({ - contextViewService: new SyncDescriptor(ContextViewService2, [], true), - }) +// Initialize services first, otherwise we can't override them. +StandaloneServices.initialize({ + contextViewService: new SyncDescriptor(ContextViewService2, [], true), +}) +const setup = createSingletonPromise(async () => { const defaults = monaco.languages.typescript.typescriptDefaults - defaults.setCompilerOptions({ ...defaults.getCompilerOptions(), strict: true,