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: 'php',
extensions: ['.php', '.php4', '.php5', '.phtml', '.ctp'],
aliases: ['PHP', 'php'],
mimetypes: ['application/x-php'],
loader: () => import('./php')
loader: () => {
if (AMD) {
return new Promise((resolve, reject) => {
require(['vs/basic-languages/php/php'], resolve, reject);
});
} else {
return import('./php');
}
}
});