Files
angular__angular/devtools/tools/angular-optimization/esbuild-plugin.d.ts
T
Alan Agius 07f58006c5 refactor(devtools): rely on esbuild to downlevel async generators
Configure esbuild with supported 'async-await': false in esbuild-base.config.mts so esbuild downlevels async functions and async generators natively.

This allows removing the custom Babel plugin @babel/plugin-transform-async-generator-functions and downlevelAsyncGeneratorsIfPresent option.
2026-08-07 10:30:52 -07:00

22 lines
597 B
TypeScript

/**
* @license
* Copyright Google LLC
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {PluginItem} from '@babel/core';
export interface OptimizationOptions {
enableLinker?: {
ensureNoPartialDeclaration: boolean;
filterPaths?: RegExp;
linkerOptions?: object;
};
optimize?: {
isSideEffectFree?: (absoluteDiskPath: string) => boolean;
};
}
export function createEsbuildAngularOptimizePlugin(opts: OptimizationOptions, additionalBabelPlugins?: PluginItem[]): Promise<any>