commit 3926698
Author: Keen Yee Liau kyliau@google.com
Date: Wed Jan 20 15:24:21 2021 -0800
release: v11.1.0
commit 16c7c84
Author: Alan Agius alan.agius4@gmail.com
Date: Wed Jan 13 09:49:18 2021 +0100
feat(aspnetcore-engine): support .NET Core version 3
.NET Core version 3 users use the `completeHTML` property instead of `html` to avoid the below error.
```
InvalidOperationException: Globals is not supported when prerendering via UseSpaPrerendering().
Instead, your prerendering logic should return a complete HTML page, in which you embed any information you wish to return to the client.
```
.NET Core 3 usage examples
```
export default createServerRenderer(async params => {
// Platform-server provider configuration
const setupOptions: IEngineOptions = {
appSelector: '<app-root></app-root>',
ngModule: AppServerModule,
document: params.data.originalHtml,
request: params,
providers: [
...
]
};
const { completeHTML } = await ngAspnetCoreEngine(setupOptions);
return { html: completeHTML };
});
```
commit adbab25
Author: Alan Agius alan.agius4@gmail.com
Date: Wed Jan 13 09:39:49 2021 +0100
feat(aspnetcore-engine): fixes for delaying platform destruction
With this change we replace the aspnet-engine to use the common engine to fix a number of problems.
1) Injector has already been destroyed. Error: Injector has already been destroyed.
2) Mismatching HTML snapshots.
This does come with a drawback, that we needed to remove `moduleRef` from the `IEngineRenderResult` this however shouldn't cause any problem since this couldn't be used because the platform would have already been destroyed.
Fixes #1808
Fixes #1404
commit 0f23806
Author: Alan Agius alan.agius4@gmail.com
Date: Fri Dec 11 09:48:01 2020 +0100
fix(builders): add missing peerDependencies to @angular-devkit/build-angular
commit b41a3fb
Author: Alan Agius alan.agius4@gmail.com
Date: Thu Dec 10 12:55:17 2020 +0100
feat: enable inlining of critical CSS optimizations
This is another feature that we mentioned in the Eliminate Render Blocking Requests RFC (https://github.com/angular/angular-cli/issues/18730)
**Prerendering**
To enable critical css inlining for prerendering set the `inlineCritical` to true under the Browser Builder options.
Example:
```json
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"optimization": {
"styles": {
"minify": true,
"inlineCritical": true,
}
},
```
**Express Engine**
Update server.ts
```ts
server.engine('html', ngExpressEngine({
bootstrap: AppServerModule,
inlineCriticalCss: true,
}));
```
**Hapi Engine**
Update server.ts
```ts
server.route({
method: 'GET',
path: '/{path*}',
handler: (req: Request) => ngHapiEngine({
bootstrap: AppServerModule,
documentFilePath,
publicPath: distFolder,
inlineCriticalCss: true,
req,
})
});
```
Inlining of critical CSS is turned off by default. In a future versions of the Angular CLI and Universal inline critical CSS will be enabled by default.
Closes #974
commit d538993
Author: Juri juri.strumpflohner@gmail.com
Date: Tue Dec 1 15:23:10 2020 +0100
fix(hapi-engine): ng-add schematic