mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
refactor: ensure modules with 'declare global' are correctly handled by Rollup
Explicitly adding an `export {}` to modules containing `declare global` fixes an issue where Rollup would incorrectly claim that the `global` variable is not defined in the emitted `.d.ts` files.
Needed to land the latest `rules_angular`.
This commit is contained in:
parent
dc3131c639
commit
bb628d8b50
4 changed files with 12 additions and 0 deletions
|
|
@ -140,3 +140,6 @@ function removeEventListeners(
|
|||
container.removeEventListener(eventTypes[i], earlyEventHandler, /* useCapture */ capture);
|
||||
}
|
||||
}
|
||||
|
||||
// This fixes the RollupError: Exported variable "global" is not defined.
|
||||
export {};
|
||||
|
|
|
|||
|
|
@ -190,3 +190,6 @@ export function registerDispatcher(
|
|||
dispatcher.dispatch(eventInfo);
|
||||
}, Restriction.I_AM_THE_JSACTION_FRAMEWORK);
|
||||
}
|
||||
|
||||
// This fixes the RollupError: Exported variable "global" is not defined.
|
||||
export {};
|
||||
|
|
|
|||
|
|
@ -159,3 +159,6 @@ export function installDevToolsSignalFormatter() {
|
|||
globalThis.devtoolsFormatters.push(formatter);
|
||||
}
|
||||
}
|
||||
|
||||
// This fixes the RollupError: Exported variable "global" is not defined.
|
||||
export {};
|
||||
|
|
|
|||
|
|
@ -90,3 +90,6 @@ export function initNgDevMode(): boolean {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// This fixes the RollupError: Exported variable "global" is not defined.
|
||||
export {};
|
||||
|
|
|
|||
Loading…
Reference in a new issue