This commit adds an option to the `CommonEngine` to enable performance profiling. When enabled, timings of a number of steps will be outputted in the server console.
Example:
```
********** Performance results **********
Retrieve SSG Page: 0.3ms
Render Page: 25.4ms
Inline Critical CSS: 2.3ms
*****************************************
```
To enable profiling set `enablePeformanceProfiler: true` in the `CommonEngine` options.
```ts
const commonEngine = new CommonEngine({
enablePeformanceProfiler: true
});
```
This commit enabled users to opt-in adding SSR and SSG to their application during the `ng new` experience. This can be done either by using the `--ssr` option or answer `Yes` when prompted.
This commit configures both `ssr` and `prerender` both both development and production configurations. This is needed to improve DX and allow for a better debugging.
This removes that code that was used to set `initialNavigation: enabledBlocking` as this is no longer needed to reduce flickering. This is because `initialNavigation: enabledBlocking` is not needed when enabling hydration via `provideClientHydration` which is done in the internal server schematic.
This fixes an issue were routes could not be discovered automatically in a standalone application.
This is a total overhaul of the route extraction process as instead of using `guess-parser` NPM package, we now use the Angular Router. This enables a number of exciting possibilities for the future which were not possible before.
# How it works?
The application is bootstrapped and through DI injection we get the injector and router config instance and recursively build the routes tree.
This commit updates the `ng generate application` to use the esbuild `application` builder. This also updates the schematics to support both `browser` and `application` builders.
BREAKING CHANGE: `rootModuleClassName`, `rootModuleFileName` and `main` options have been removed from the public `pwa` and `app-shell` schematics.
The JavaScript generated for the published packages is now using ES2022.
This removes additional downleveling of code that was previously necessary
to use newer features.
The minimum Node.js version of 18.13 provides support for the needed features.
While this change does require a patch to `@bazel/concatjs` to allow the target
to be set to `ES2022`, this patch is now already required by the migration of
the universal repository into the CLI repository.
This is necessary for Wombat publishing. Normally most packages have this generated at build time through `pkg_npm`, however we need to use `ng_package` in this case which does not do this by default.
This removes the util function for express, instead the "CommonEngine" is called directly infuture before this package is final we might rename the "CommonEngine" to something else.
The `@angular/ssr` package does not require the Angular compiler and can instead use the
`ts_library` to compile the TypeScript code. The `@angular/bazel` package has also been
update and a more limited patch is now used due to only needing the `ng_package` rule.
The continued use of the `ng_package` rule maintains the existing output structure for the
`@angular/ssr` package.