mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
aee83d1629
Migrate angular-optimization to devtools instead of loading via npm package PR Close #62505
23 lines
643 B
TypeScript
23 lines
643 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.io/license
|
|
*/
|
|
|
|
import {PluginItem} from '@babel/core';
|
|
|
|
export interface OptimizationOptions {
|
|
enableLinker?: {
|
|
ensureNoPartialDeclaration: boolean;
|
|
filterPaths?: RegExp;
|
|
linkerOptions?: object;
|
|
};
|
|
optimize?: {
|
|
isSideEffectFree?: (absoluteDiskPath: string) => boolean;
|
|
};
|
|
downlevelAsyncGeneratorsIfPresent?: boolean;
|
|
}
|
|
|
|
export function createEsbuildAngularOptimizePlugin(opts: OptimizationOptions, additionalBabelPlugins?: PluginItem[]): Promise<any> |