diff --git a/build/lib/bundle.js b/build/lib/bundle.js index 7d0c8d9b55e..143e64e087d 100644 --- a/build/lib/bundle.js +++ b/build/lib/bundle.js @@ -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 = {}; diff --git a/build/lib/bundle.ts b/build/lib/bundle.ts index 562b050d1fd..ce1f6e61662 100644 --- a/build/lib/bundle.ts +++ b/build/lib/bundle.ts @@ -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; }); diff --git a/src/buildfile.js b/src/buildfile.js index 7588e1f8b3c..5b9b061df45 100644 --- a/src/buildfile.js +++ b/src/buildfile.js @@ -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'