Adopt esbuild for monaco-languages

This commit is contained in:
Alexandru Dima 2021-11-12 12:48:50 +01:00
parent a50081289e
commit 0c394c0c7c
No known key found for this signature in database
GPG key ID: 39563C1504FDD0C9
81 changed files with 987 additions and 102 deletions

View file

@ -5,10 +5,21 @@
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: () => import('./graphql')
loader: () => {
if (AMD) {
return new Promise((resolve, reject) => {
require(['vs/basic-languages/graphql/graphql'], resolve, reject);
});
} else {
return import('./graphql');
}
}
});