Fix problem with duplicated entry points
parent
6670578157
commit
c30ffc4a7e
|
@ -14,6 +14,9 @@ const vm = require("vm");
|
|||
function bundle(entryPoints, config, callback) {
|
||||
const entryPointsMap = {};
|
||||
entryPoints.forEach((module) => {
|
||||
if (entryPointsMap[module.name]) {
|
||||
throw new Error(`Cannot have two entry points with the same name '${module.name}'`);
|
||||
}
|
||||
entryPointsMap[module.name] = module;
|
||||
});
|
||||
const allMentionedModulesMap = {};
|
||||
|
|
|
@ -100,6 +100,9 @@ export interface ILoaderConfig {
|
|||
export function bundle(entryPoints: IEntryPoint[], config: ILoaderConfig, callback: (err: any, result: IBundleResult | null) => void): void {
|
||||
const entryPointsMap: IEntryPointMap = {};
|
||||
entryPoints.forEach((module: IEntryPoint) => {
|
||||
if (entryPointsMap[module.name]) {
|
||||
throw new Error(`Cannot have two entry points with the same name '${module.name}'`);
|
||||
}
|
||||
entryPointsMap[module.name] = module;
|
||||
});
|
||||
|
||||
|
|
|
@ -7,8 +7,8 @@ const { createModuleDescription, createEditorWorkerModuleDescription } = require
|
|||
|
||||
exports.base = [
|
||||
{
|
||||
name: 'vs/base/common/worker/simpleWorker',
|
||||
include: ['vs/editor/common/services/editorSimpleWorker'],
|
||||
name: 'vs/editor/common/services/editorSimpleWorker',
|
||||
include: ['vs/base/common/worker/simpleWorker'],
|
||||
prepend: ['vs/loader.js', 'vs/nls.js'],
|
||||
append: ['vs/base/worker/workerMain'],
|
||||
dest: 'vs/base/worker/workerMain.js'
|
||||
|
|
Loading…
Reference in New Issue