monaco worker context path 처리 수정

This commit is contained in:
현성필
2024-01-29 11:10:50 +09:00
parent b490e37c35
commit 5c890d5843
2 changed files with 9 additions and 6 deletions
+8 -5
View File
@@ -7,20 +7,23 @@ window.MonacoEnvironment = {
if (!contextPath) {
contextPath = '/';
}
if (!contextPath.endsWith('/')) {
contextPath += '/';
}
if (label === 'json') {
return contextPath + '/plugins/apitestmanager/json.worker.bundle.js';
return contextPath + 'plugins/apitestmanager/json.worker.bundle.js';
}
if (label === 'css' || label === 'scss' || label === 'less') {
return contextPath + '/plugins/apitestmanager/css.worker.bundle.js';
return contextPath + 'plugins/apitestmanager/css.worker.bundle.js';
}
if (label === 'html' || label === 'handlebars' || label === 'razor') {
return contextPath + '/plugins/apitestmanager/html.worker.bundle.js';
return contextPath + 'plugins/apitestmanager/html.worker.bundle.js';
}
if (label === 'typescript' || label === 'javascript') {
return contextPath + '/plugins/apitestmanager/ts.worker.bundle.js';
return contextPath + 'plugins/apitestmanager/ts.worker.bundle.js';
}
return '/plugins/apitestmanager/editor.worker.bundle.js';
return contextPath + 'plugins/apitestmanager/editor.worker.bundle.js';
}
};