mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 23:13:02 +01:00
Fixes #26
This commit is contained in:
parent
02fcbd578a
commit
e605ab21ef
2 changed files with 15 additions and 4 deletions
|
|
@ -119,9 +119,11 @@ module.exports = {
|
||||||
entry: 'vs/editor/standalone/browser/quickOpen/quickOutline',
|
entry: 'vs/editor/standalone/browser/quickOpen/quickOutline',
|
||||||
worker: undefined,
|
worker: undefined,
|
||||||
},
|
},
|
||||||
// TODO: here
|
|
||||||
referenceSearch: {
|
referenceSearch: {
|
||||||
entry: 'vs/editor/standalone/browser/referenceSearch/standaloneReferenceSearch',
|
entry: [
|
||||||
|
'vs/editor/contrib/referenceSearch/referenceSearch',
|
||||||
|
'vs/editor/standalone/browser/referenceSearch/standaloneReferenceSearch',
|
||||||
|
],
|
||||||
worker: undefined,
|
worker: undefined,
|
||||||
},
|
},
|
||||||
rename: {
|
rename: {
|
||||||
|
|
|
||||||
13
index.js
13
index.js
|
|
@ -84,8 +84,8 @@ function getPublicPath(compiler) {
|
||||||
|
|
||||||
function createLoaderRules(languages, features, workers, outputPath, publicPath) {
|
function createLoaderRules(languages, features, workers, outputPath, publicPath) {
|
||||||
if (!languages.length && !features.length) { return []; }
|
if (!languages.length && !features.length) { return []; }
|
||||||
const languagePaths = languages.map(({ entry }) => entry).filter(Boolean);
|
const languagePaths = flatArr(languages.map(({ entry }) => entry).filter(Boolean));
|
||||||
const featurePaths = features.map(({ entry }) => entry).filter(Boolean);
|
const featurePaths = flatArr(features.map(({ entry }) => entry).filter(Boolean));
|
||||||
const workerPaths = fromPairs(workers.map(({ label, output }) => [label, path.join(outputPath, output)]));
|
const workerPaths = fromPairs(workers.map(({ label, output }) => [label, path.join(outputPath, output)]));
|
||||||
|
|
||||||
const globals = {
|
const globals = {
|
||||||
|
|
@ -162,6 +162,15 @@ function flatMap(items, iteratee) {
|
||||||
return items.map(iteratee).reduce((acc, item) => [].concat(acc).concat(item), []);
|
return items.map(iteratee).reduce((acc, item) => [].concat(acc).concat(item), []);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function flatArr(items) {
|
||||||
|
return items.reduce((acc, item) => {
|
||||||
|
if (Array.isArray(item)) {
|
||||||
|
return [].concat(acc).concat(item);
|
||||||
|
}
|
||||||
|
return [].concat(acc).concat([item]);
|
||||||
|
}, []);
|
||||||
|
}
|
||||||
|
|
||||||
function toPairs(object) {
|
function toPairs(object) {
|
||||||
return Object.keys(object).map((key) => [key, object[key]]);
|
return Object.keys(object).map((key) => [key, object[key]]);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue