mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-27 05:37:45 +00:00
Fix problem with duplicated entry points
This commit is contained in:
@@ -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;
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user