mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 07:00:11 +01:00
Inlines AMD = false (#5031)
This commit is contained in:
parent
953f4ecc85
commit
b16daf88e2
89 changed files with 93 additions and 1079 deletions
|
|
@ -5,20 +5,9 @@
|
|||
|
||||
import { registerLanguage } from '../_.contribution';
|
||||
|
||||
declare var AMD: any;
|
||||
declare var require: any;
|
||||
|
||||
registerLanguage({
|
||||
id: 'aes',
|
||||
extensions: ['.aes'],
|
||||
aliases: ['aes', 'sophia', 'Sophia'],
|
||||
loader: () => {
|
||||
if (AMD) {
|
||||
return new Promise((resolve, reject) => {
|
||||
require(['vs/basic-languages/sophia/sophia'], resolve, reject);
|
||||
});
|
||||
} else {
|
||||
return import('./sophia');
|
||||
}
|
||||
}
|
||||
loader: () => import('./sophia')
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue