mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 05:50:11 +01:00
Adopt latest monaco-json
This commit is contained in:
parent
8eaefdcbad
commit
fb0c77cf75
5 changed files with 18 additions and 33 deletions
11
gulpfile.js
11
gulpfile.js
|
|
@ -228,6 +228,11 @@ function addPluginContribs(type) {
|
|||
'define("vs/basic-languages/_.contribution",["require","exports","vs/editor/editor.api"],',
|
||||
);
|
||||
|
||||
contribContents = contribContents.replace(
|
||||
`define('vs/language/json/fillers/monaco-editor-core',[],`,
|
||||
`define('vs/language/json/fillers/monaco-editor-core',['vs/editor/editor.api'],`,
|
||||
);
|
||||
|
||||
extraContent.push(contribContents);
|
||||
});
|
||||
|
||||
|
|
@ -291,7 +296,7 @@ function ESM_pluginStream(plugin, destinationPath) {
|
|||
|
||||
const info = ts.preProcessFile(contents);
|
||||
for (let i = info.importedFiles.length - 1; i >= 0; i--) {
|
||||
const importText = info.importedFiles[i].fileName;
|
||||
let importText = info.importedFiles[i].fileName;
|
||||
const pos = info.importedFiles[i].pos;
|
||||
const end = info.importedFiles[i].end;
|
||||
|
||||
|
|
@ -302,6 +307,10 @@ function ESM_pluginStream(plugin, destinationPath) {
|
|||
process.exit(0);
|
||||
}
|
||||
|
||||
if (importText === 'monaco-editor-core') {
|
||||
importText = 'monaco-editor-core/esm/vs/editor/editor.api';
|
||||
}
|
||||
|
||||
const myFileDestPath = path.join(DESTINATION, plugin.modulePrefix, data.relative);
|
||||
const importFilePath = path.join(DESTINATION, importText.substr('monaco-editor-core/esm/'.length));
|
||||
let relativePath = path.relative(path.dirname(myFileDestPath), importFilePath).replace(/\\/g, '/');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue