Make monaco worker optional
This commit is contained in:
parent
978d270495
commit
b377f11dd7
|
|
@ -3,11 +3,14 @@ const require = win.require;
|
|||
|
||||
let initialized = false;
|
||||
|
||||
export function initializeMonacoWorker(libPath: string) {
|
||||
export function initializeMonacoWorker(libPath?: string) {
|
||||
|
||||
if (initialized)
|
||||
return;
|
||||
|
||||
if (!libPath)
|
||||
return;
|
||||
|
||||
const origin = document.location.origin;
|
||||
const baseUrl = `${origin}/${libPath}`;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue