mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 17:25:39 +01:00
Don't load editor api from global API but use require directly.
This commit is contained in:
parent
a35721026f
commit
9eb7c18143
4 changed files with 10 additions and 14 deletions
|
|
@ -1,8 +0,0 @@
|
||||||
/*---------------------------------------------------------------------------------------------
|
|
||||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
||||||
*--------------------------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
// Resolves with the global monaco API
|
|
||||||
|
|
||||||
export = (<any>self).monaco;
|
|
||||||
|
|
@ -181,9 +181,10 @@ function buildOneAMD(type, options) {
|
||||||
plugins: [
|
plugins: [
|
||||||
alias({
|
alias({
|
||||||
'vscode-nls': path.join(__dirname, '../build/fillers/vscode-nls.ts'),
|
'vscode-nls': path.join(__dirname, '../build/fillers/vscode-nls.ts'),
|
||||||
'monaco-editor-core': path.join(__dirname, '../build/fillers/monaco-editor-core-amd.ts')
|
'monaco-editor-core': path.join(__dirname, '../src/fillers/monaco-editor-core-amd.ts')
|
||||||
})
|
})
|
||||||
]
|
],
|
||||||
|
external: ['vs/editor/editor.api']
|
||||||
};
|
};
|
||||||
if (type === 'min') {
|
if (type === 'min') {
|
||||||
opts.minify = true;
|
opts.minify = true;
|
||||||
|
|
|
||||||
4
src/fillers/editor.api.d.ts
vendored
Normal file
4
src/fillers/editor.api.d.ts
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
declare module 'vs/editor/editor.api' {
|
||||||
|
const x: any;
|
||||||
|
export = x;
|
||||||
|
}
|
||||||
|
|
@ -5,8 +5,7 @@
|
||||||
|
|
||||||
// Resolves with the global monaco API
|
// Resolves with the global monaco API
|
||||||
|
|
||||||
declare var define: any;
|
/// <reference path="./editor.api.d.ts" />
|
||||||
|
import * as api from 'vs/editor/editor.api';
|
||||||
|
|
||||||
define([], function () {
|
export = api;
|
||||||
return (<any>self).monaco;
|
|
||||||
});
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue