Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/microsoft/vscode.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'build/lib/bundle.ts')
-rw-r--r--build/lib/bundle.ts12
1 files changed, 10 insertions, 2 deletions
diff --git a/build/lib/bundle.ts b/build/lib/bundle.ts
index a1130d4bbbd..4c8a3e14589 100644
--- a/build/lib/bundle.ts
+++ b/build/lib/bundle.ts
@@ -15,7 +15,7 @@ interface IPosition {
interface IBuildModuleInfo {
id: string;
path: string;
- defineLocation: IPosition;
+ defineLocation: IPosition | null;
dependencies: string[];
shim: string;
exports: any;
@@ -444,8 +444,16 @@ function emitEntryPoint(
if (module.shim) {
mainResult.sources.push(emitShimmedModule(c, deps[c], module.shim, module.path, contents));
- } else {
+ } else if (module.defineLocation) {
mainResult.sources.push(emitNamedModule(c, module.defineLocation, module.path, contents));
+ } else {
+ const moduleCopy = {
+ id: module.id,
+ path: module.path,
+ defineLocation: module.defineLocation,
+ dependencies: module.dependencies
+ };
+ throw new Error(`Cannot bundle module '${module.id}' for entry point '${entryPoint}' because it has no shim and it lacks a defineLocation: ${JSON.stringify(moduleCopy)}`);
}
});