mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 17:25:39 +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,21 +5,10 @@
|
|||
|
||||
import { registerLanguage } from '../_.contribution';
|
||||
|
||||
declare var AMD: any;
|
||||
declare var require: any;
|
||||
|
||||
registerLanguage({
|
||||
id: 'graphql',
|
||||
extensions: ['.graphql', '.gql'],
|
||||
aliases: ['GraphQL', 'graphql', 'gql'],
|
||||
mimetypes: ['application/graphql'],
|
||||
loader: () => {
|
||||
if (AMD) {
|
||||
return new Promise((resolve, reject) => {
|
||||
require(['vs/basic-languages/graphql/graphql'], resolve, reject);
|
||||
});
|
||||
} else {
|
||||
return import('./graphql');
|
||||
}
|
||||
}
|
||||
loader: () => import('./graphql')
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue