mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 18:32:56 +01:00
Fix paths when running from file://
This commit is contained in:
parent
8f2bc4ac98
commit
75af762db9
1 changed files with 5 additions and 5 deletions
|
|
@ -71,7 +71,7 @@
|
||||||
if (/\.\//.test(resolvedPath)) {
|
if (/\.\//.test(resolvedPath)) {
|
||||||
// starts with ./ => treat as relative to the root path
|
// starts with ./ => treat as relative to the root path
|
||||||
if (IS_FILE_PROTOCOL) {
|
if (IS_FILE_PROTOCOL) {
|
||||||
resolvedPath = DIRNAME + '/../' + this.rootPath + '/' + resolvedPath;
|
resolvedPath = DIRNAME + '/../../' + this.rootPath + '/' + resolvedPath;
|
||||||
} else {
|
} else {
|
||||||
resolvedPath = PATH_PREFIX + '/monaco-editor/' + this.rootPath + '/' + resolvedPath;
|
resolvedPath = PATH_PREFIX + '/monaco-editor/' + this.rootPath + '/' + resolvedPath;
|
||||||
}
|
}
|
||||||
|
|
@ -81,13 +81,13 @@
|
||||||
this.isRelease()
|
this.isRelease()
|
||||||
) {
|
) {
|
||||||
if (IS_FILE_PROTOCOL) {
|
if (IS_FILE_PROTOCOL) {
|
||||||
resolvedPath = DIRNAME + '/../' + resolvedPath;
|
resolvedPath = DIRNAME + '/../../' + resolvedPath;
|
||||||
} else {
|
} else {
|
||||||
resolvedPath = PATH_PREFIX + '/monaco-editor/' + resolvedPath;
|
resolvedPath = PATH_PREFIX + '/monaco-editor/' + resolvedPath;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (IS_FILE_PROTOCOL) {
|
if (IS_FILE_PROTOCOL) {
|
||||||
resolvedPath = DIRNAME + '/../..' + resolvedPath;
|
resolvedPath = DIRNAME + '/../../../' + resolvedPath;
|
||||||
} else {
|
} else {
|
||||||
resolvedPath = PATH_PREFIX + resolvedPath;
|
resolvedPath = PATH_PREFIX + resolvedPath;
|
||||||
}
|
}
|
||||||
|
|
@ -210,9 +210,9 @@
|
||||||
window.AMD = true;
|
window.AMD = true;
|
||||||
if (IS_FILE_PROTOCOL) {
|
if (IS_FILE_PROTOCOL) {
|
||||||
loaderPathsConfig['vs/language/fillers/monaco-editor-core'] =
|
loaderPathsConfig['vs/language/fillers/monaco-editor-core'] =
|
||||||
DIRNAME + '/.././out/amd/fillers/monaco-editor-core-amd';
|
DIRNAME + '/../.././out/amd/fillers/monaco-editor-core-amd';
|
||||||
loaderPathsConfig['vs/fillers/monaco-editor-core'] =
|
loaderPathsConfig['vs/fillers/monaco-editor-core'] =
|
||||||
DIRNAME + '/.././out/amd/fillers/monaco-editor-core-amd';
|
DIRNAME + '/../.././out/amd/fillers/monaco-editor-core-amd';
|
||||||
} else {
|
} else {
|
||||||
loaderPathsConfig['vs/language/fillers/monaco-editor-core'] =
|
loaderPathsConfig['vs/language/fillers/monaco-editor-core'] =
|
||||||
PATH_PREFIX + '/monaco-editor/./out/amd/fillers/monaco-editor-core-amd';
|
PATH_PREFIX + '/monaco-editor/./out/amd/fillers/monaco-editor-core-amd';
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue