mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
The `ng_rollup_bundle` rule has been replaced with a new rule called `app_bundle`. This rule replicates the Angular v13 optimization pipeline in the CLI, so that we can get better benchmarking results. Also the rule is much simpler to maintain as it relies on ESbuild. The old `ng_rollup_bundle` rule did rely on e.g. build-optimizer that no longer has an effect on v13 Angular packages, so technically size tests/symbol tests were no longer as correct as they were before. This commit fixes that. A couple of different changes and their explanation: * Language-service will no longer use the benchmark rule for creating its NPM bundles! It will use plain `rollup_bundle`. ESBuild would have been nice but the language-service relies on AMD that ESBuild cannot generate (yet?) * Service-worker ngsw-worker.js file was generated using the benchmark bundle rule. This is wrong. We will use a simple ESbuild rule in the future. The output is more predictable that way, and we can have a clear use of the benchmark bundle rule.. * A couple of benchmarks in `modules/` had to be updated to use e.g. `initTableUtils` calls. This is done because with the new rule, all files except for the entry-point are considered side-effect free. The utilities for benchmarks relied on side-effects in some transitively-loaded file (bad practice anyway IMO). We are now initializing the utilities using a proper init function that is exported... PR Close #44490
39 lines
1.5 KiB
TypeScript
39 lines
1.5 KiB
TypeScript
/**
|
|
* @license
|
|
* Copyright Google LLC All Rights Reserved.
|
|
*
|
|
* 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 {NodeJSFileSystem, setFileSystem} from './src/ngtsc/file_system';
|
|
|
|
export {VERSION} from './src/version';
|
|
|
|
export * from './src/transformers/api';
|
|
export * from './src/transformers/entry_points';
|
|
|
|
export * from './src/perform_compile';
|
|
|
|
// TODO(tbosch): remove this once usages in G3 are changed to `CompilerOptions`
|
|
export {CompilerOptions as AngularCompilerOptions} from './src/transformers/api';
|
|
|
|
// Internal exports needed for packages relying on the compiler-cli.
|
|
// TODO: Remove this when the CLI has switched to the private entry-point.
|
|
export * from './private/tooling';
|
|
|
|
// Exposed as they are needed for relying on the `linker`.
|
|
export * from './src/ngtsc/logging';
|
|
export * from './src/ngtsc/file_system';
|
|
|
|
// Exports for dealing with the `ngtsc` program.
|
|
export {NgTscPlugin} from './src/ngtsc/tsc_plugin';
|
|
export {NgtscProgram} from './src/ngtsc/program';
|
|
export {OptimizeFor} from './src/ngtsc/typecheck/api';
|
|
|
|
// **Note**: Explicit named exports to make this file work with CJS/ESM interop without
|
|
// needing to use a default import. NodeJS will expose named CJS exports as named ESM exports.
|
|
// TODO(devversion): Remove these duplicate exports once devmode&prodmode is combined/ESM.
|
|
export {ConsoleLogger, Logger, LogLevel} from './src/ngtsc/logging';
|
|
export {NodeJSFileSystem} from './src/ngtsc/file_system';
|
|
|
|
setFileSystem(new NodeJSFileSystem());
|